Compare commits
29 Commits
cffbd51d92
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 858189d6da | |||
| ec42ebcb25 | |||
| f4629e5fcc | |||
| dafe4c5336 | |||
| 5439d5111a | |||
| 1e5ef47a4d | |||
| 2b87c67876 | |||
| 0db90c0e4b | |||
| 1e07093101 | |||
| ce25ee930a | |||
| a293e0286a | |||
| 012b8a7ff6 | |||
|
|
9610e7138d | ||
| d5d078413c | |||
| 17662ef7cb | |||
| 9d8da15d0e | |||
| d503cf5dc9 | |||
|
|
48a227d519 | ||
| f653a1e98c | |||
|
|
1725c5b0e9 | ||
|
|
d7cb8e1072 | ||
| 9b7a8ae2c8 | |||
|
|
dc50432ee8 | ||
|
|
c99d24e4c6 | ||
|
|
f9d1348fd0 | ||
|
|
428c611ec6 | ||
| 2fb73e6713 | |||
| 3886277616 | |||
| 83018fabe0 |
@@ -66,6 +66,33 @@
|
|||||||
"units": ["g/m³", "mol/m³"]
|
"units": ["g/m³", "mol/m³"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Quantity (Ammonium)",
|
||||||
|
"models": [
|
||||||
|
{
|
||||||
|
"name": "VegaAmmoniaSense 10",
|
||||||
|
"units": ["g/m³", "mol/m³"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Quantity (NOx)",
|
||||||
|
"models": [
|
||||||
|
{
|
||||||
|
"name": "VegaNOxSense 10",
|
||||||
|
"units": ["g/m³", "mol/m³"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Quantity (TSS)",
|
||||||
|
"models": [
|
||||||
|
{
|
||||||
|
"name": "VegaSolidsProbe",
|
||||||
|
"units": ["g/m³"]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -83,7 +110,12 @@
|
|||||||
{
|
{
|
||||||
"id": "hidrostal-pump-001",
|
"id": "hidrostal-pump-001",
|
||||||
"name": "hidrostal-H05K-S03R",
|
"name": "hidrostal-H05K-S03R",
|
||||||
"units": ["m³/h", "gpm", "l/min"]
|
"units": ["l/s"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "hidrostal-pump-002",
|
||||||
|
"name": "hidrostal-C5-D03R-SHN1",
|
||||||
|
"units": ["l/s"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
838
datasets/assetData/curves/hidrostal-C5-D03R-SHN1.json
Normal file
838
datasets/assetData/curves/hidrostal-C5-D03R-SHN1.json
Normal file
@@ -0,0 +1,838 @@
|
|||||||
|
{
|
||||||
|
"np": {
|
||||||
|
"400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5953611390998625,
|
||||||
|
1.6935085477165994,
|
||||||
|
3.801139124304824,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.8497068236812997,
|
||||||
|
3.801139124304824,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.7497197821018213,
|
||||||
|
3.801139124304824,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.788320579602724,
|
||||||
|
3.9982668237045984,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.7824519364844427,
|
||||||
|
3.9885060367793064,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6934482683506376,
|
||||||
|
3.9879559558537054,
|
||||||
|
7.367829525776738,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1000": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6954385513069579,
|
||||||
|
4.0743508382926795,
|
||||||
|
7.422392692482345,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1100": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.160745720731654,
|
||||||
|
7.596626714476177,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1200": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.302551231007837,
|
||||||
|
7.637247864947884,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1300": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.37557913990704,
|
||||||
|
7.773442147000839,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.334434337766139,
|
||||||
|
7.940911352646818,
|
||||||
|
12.081735423116616
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.2327206586037995,
|
||||||
|
8.005238800611183,
|
||||||
|
12.254836577088351
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
4.195405588464695,
|
||||||
|
7.991827302945298,
|
||||||
|
12.423663269044452
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
14.255458319309813,
|
||||||
|
8.096768422220196,
|
||||||
|
12.584668380908582
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
31.54620347513727,
|
||||||
|
12.637080520201405
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.148423429611098,
|
||||||
|
12.74916725120127
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2000": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.146439484120116,
|
||||||
|
12.905178964345618
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2100": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.149576025637684,
|
||||||
|
13.006940917309247
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2200": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.126246430368305,
|
||||||
|
13.107503837410825
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2300": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.104379361635342,
|
||||||
|
13.223235973280122
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
8.135190080423746,
|
||||||
|
13.36128347785936
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
7.981219508598527,
|
||||||
|
13.473697427231842
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
7.863899404441271,
|
||||||
|
13.50303289156837
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
7.658860522528131,
|
||||||
|
13.485230880073107
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
7.44407948309266,
|
||||||
|
13.446135725634615
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
0.5522732775894703,
|
||||||
|
1.6920721090317592,
|
||||||
|
3.8742719210788685,
|
||||||
|
7.44407948309266,
|
||||||
|
13.413693596332184
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nq": {
|
||||||
|
"400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
7.6803204433986965,
|
||||||
|
25.506609120436963,
|
||||||
|
35.4,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
22.622804921188227,
|
||||||
|
35.4,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
19.966301579194372,
|
||||||
|
35.4,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
17.430763940163832,
|
||||||
|
33.79508340848005,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
14.752921911234477,
|
||||||
|
31.71885034449889,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
11.854693031181021,
|
||||||
|
29.923046639543475,
|
||||||
|
44.4,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1000": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.549433913822687,
|
||||||
|
26.734189128096668,
|
||||||
|
43.96760750800311,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1100": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
26.26933164936586,
|
||||||
|
42.23523193272671,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1200": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
24.443114637042832,
|
||||||
|
40.57167959798151,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1300": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
22.41596168949836,
|
||||||
|
39.04561852479495,
|
||||||
|
52.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
20.276864821170303,
|
||||||
|
37.557663261443224,
|
||||||
|
52.252852231224054
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
18.252772588147742,
|
||||||
|
35.9974418607538,
|
||||||
|
50.68604059588987
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
16.31441663648616,
|
||||||
|
34.51170378091407,
|
||||||
|
49.20153034100798
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
14.255458319309813,
|
||||||
|
33.043410795291045,
|
||||||
|
47.820213744181245
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
31.54620347513727,
|
||||||
|
46.51705619739449
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"1900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
29.986013742375484,
|
||||||
|
45.29506741639918
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2000": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
28.432646044605782,
|
||||||
|
44.107822395271945
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2100": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
26.892634464336055,
|
||||||
|
42.758175515158776
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2200": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
25.270679127870263,
|
||||||
|
41.467063889795895
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2300": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
23.531132157718837,
|
||||||
|
40.293041104955826
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2400": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
21.815645106750623,
|
||||||
|
39.03109248860755
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2500": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
20.34997949463564,
|
||||||
|
37.71320701654063
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2600": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
18.81710568651804,
|
||||||
|
36.35563657017404
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2700": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
17.259072160217805,
|
||||||
|
35.02979557646653
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2800": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
16,
|
||||||
|
33.74372254979665
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"2900": {
|
||||||
|
"x": [
|
||||||
|
0,
|
||||||
|
25.510204081632654,
|
||||||
|
51.020408163265309,
|
||||||
|
76.530612244897952,
|
||||||
|
100
|
||||||
|
],
|
||||||
|
"y": [
|
||||||
|
6.4,
|
||||||
|
9.500000000000002,
|
||||||
|
12.7,
|
||||||
|
16,
|
||||||
|
32.54934541379723
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
datasets/get_all_assets.php
Normal file
1
datasets/get_all_assets.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Database connection failed: SQLSTATE[28000] [1045] Access denied for user 'pimmoe1q_rdlab'@'localhost' (using password: YES)
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,229 +0,0 @@
|
|||||||
{
|
|
||||||
"success": true,
|
|
||||||
"message": "Product modellen succesvol opgehaald.",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": "1",
|
|
||||||
"name": "Macbook Air 12",
|
|
||||||
"product_model_subtype_id": "1",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "1",
|
|
||||||
"product_model_status": null,
|
|
||||||
"vendor_name": "Apple",
|
|
||||||
"product_subtype_name": "Laptop",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "2",
|
|
||||||
"name": "Macbook Air 13",
|
|
||||||
"product_model_subtype_id": "1",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "1",
|
|
||||||
"product_model_status": null,
|
|
||||||
"vendor_name": "Apple",
|
|
||||||
"product_subtype_name": "Laptop",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "3",
|
|
||||||
"name": "AirMac 1 128 GB White",
|
|
||||||
"product_model_subtype_id": "2",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "1",
|
|
||||||
"product_model_status": null,
|
|
||||||
"vendor_name": "Apple",
|
|
||||||
"product_subtype_name": "Desktop",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "4",
|
|
||||||
"name": "AirMac 2 256 GB Black",
|
|
||||||
"product_model_subtype_id": "2",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "1",
|
|
||||||
"product_model_status": null,
|
|
||||||
"vendor_name": "Apple",
|
|
||||||
"product_subtype_name": "Desktop",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "5",
|
|
||||||
"name": "AirMac 2 256 GB White",
|
|
||||||
"product_model_subtype_id": "2",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "1",
|
|
||||||
"product_model_status": null,
|
|
||||||
"vendor_name": "Apple",
|
|
||||||
"product_subtype_name": "Desktop",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "6",
|
|
||||||
"name": "Vegabar 14",
|
|
||||||
"product_model_subtype_id": "3",
|
|
||||||
"product_model_description": "vegabar 14",
|
|
||||||
"vendor_id": "4",
|
|
||||||
"product_model_status": "Actief",
|
|
||||||
"vendor_name": "vega",
|
|
||||||
"product_subtype_name": "pressure",
|
|
||||||
"product_model_meta": {
|
|
||||||
"machineCurve": {
|
|
||||||
"np": {
|
|
||||||
"700": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
12.962460720759278,
|
|
||||||
20.65443723573673,
|
|
||||||
31.029351002816465,
|
|
||||||
44.58926412111886,
|
|
||||||
62.87460150792057
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"800": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
13.035157335397209,
|
|
||||||
20.74906989186132,
|
|
||||||
31.029351002816465,
|
|
||||||
44.58926412111886,
|
|
||||||
62.87460150792057
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"900": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
13.064663380158798,
|
|
||||||
20.927197054134297,
|
|
||||||
31.107126521989933,
|
|
||||||
44.58926412111886,
|
|
||||||
62.87460150792057
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"1000": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
13.039271391128953,
|
|
||||||
21.08680188366637,
|
|
||||||
31.30899920405947,
|
|
||||||
44.58926412111886,
|
|
||||||
62.87460150792057
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"1100": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
12.940075520572446,
|
|
||||||
21.220547481589954,
|
|
||||||
31.51468295656385,
|
|
||||||
44.621326083982,
|
|
||||||
62.87460150792057
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nq": {
|
|
||||||
"700": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
119.13938764447377,
|
|
||||||
150.12178608265387,
|
|
||||||
178.82698019104356,
|
|
||||||
202.3699313222398,
|
|
||||||
227.06382297856618
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"800": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
112.59072109293984,
|
|
||||||
148.15847460389205,
|
|
||||||
178.82698019104356,
|
|
||||||
202.3699313222398,
|
|
||||||
227.06382297856618
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"900": {
|
|
||||||
"x": [
|
|
||||||
0,
|
|
||||||
24.59,
|
|
||||||
49.18,
|
|
||||||
73.77,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"y": [
|
|
||||||
105.6217241180404,
|
|
||||||
144.00502117747064,
|
|
||||||
177.15212647335034,
|
|
||||||
202.3699313222398,
|
|
||||||
227.06382297856618
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "7",
|
|
||||||
"name": "Vegabar 10",
|
|
||||||
"product_model_subtype_id": "3",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "4",
|
|
||||||
"product_model_status": "Actief",
|
|
||||||
"vendor_name": "vega",
|
|
||||||
"product_subtype_name": "pressure",
|
|
||||||
"product_model_meta": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "8",
|
|
||||||
"name": "VegaFlow 10",
|
|
||||||
"product_model_subtype_id": "4",
|
|
||||||
"product_model_description": null,
|
|
||||||
"vendor_id": "4",
|
|
||||||
"product_model_status": "Actief",
|
|
||||||
"vendor_name": "vega",
|
|
||||||
"product_subtype_name": "flow",
|
|
||||||
"product_model_meta": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
694
src/configs/pumpingStation.json
Normal file
694
src/configs/pumpingStation.json
Normal file
@@ -0,0 +1,694 @@
|
|||||||
|
{
|
||||||
|
"general": {
|
||||||
|
"name": {
|
||||||
|
"default": "Pumping Station",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "A human-readable name or label for this pumping station configuration."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"default": null,
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "A unique identifier for this pumping station configuration. If not provided, defaults to null."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unit": {
|
||||||
|
"default": "m3/h",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The default flow unit used for reporting station throughput."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"logLevel": {
|
||||||
|
"default": "info",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "debug",
|
||||||
|
"description": "Log verbose diagnostic messages that aid in troubleshooting the station."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "info",
|
||||||
|
"description": "Log general informational messages about station behavior."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "warn",
|
||||||
|
"description": "Log warnings when station behavior deviates from expected ranges."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "error",
|
||||||
|
"description": "Log only error level messages for critical failures."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Defines the minimum severity that will be written to the log."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"enabled": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, logging is active for the pumping station node."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"functionality": {
|
||||||
|
"softwareType": {
|
||||||
|
"default": "pumpingStation",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Specified software type used to locate the proper default configuration."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"default": "StationController",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Describes the station's function within the EVOLV ecosystem."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"positionVsParent": {
|
||||||
|
"default": "atEquipment",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"description": "Defines how the station is positioned relative to its parent process or site.",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "atEquipment",
|
||||||
|
"description": "The station is controlled at the equipment level and represents the primary pumping asset."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "upstream",
|
||||||
|
"description": "The station governs flows entering upstream of the parent asset."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "downstream",
|
||||||
|
"description": "The station influences conditions downstream of the parent asset, such as discharge or transfer."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tickIntervalMs": {
|
||||||
|
"default": 1000,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 100,
|
||||||
|
"description": "Interval in milliseconds between internal evaluation cycles and output refreshes."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supportsSimulation": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Indicates whether the station can operate using simulated inflow and level data."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supportedChildSoftwareTypes": {
|
||||||
|
"default": [
|
||||||
|
"measurement"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"type": "set",
|
||||||
|
"itemType": "string",
|
||||||
|
"description": "List of child node software types that may register with the station."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"uuid": {
|
||||||
|
"default": null,
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Asset tag number which is a universally unique identifier for this pumping station."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tagCode": {
|
||||||
|
"default": null,
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Asset tag code which uniquely identifies the pumping station. May be null if not assigned."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"default": "station",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "station",
|
||||||
|
"description": "Represents a dedicated pumping station asset."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "High level classification for asset reporting."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"default": "pumpingStation",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Specific asset type used to identify this configuration."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"default": "Unknown",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Manufacturer or integrator model designation for the station."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supplier": {
|
||||||
|
"default": "Unknown",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Primary supplier or maintainer responsible for the station."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"geoLocation": {
|
||||||
|
"default": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Coordinate reference for locating the pumping station.",
|
||||||
|
"schema": {
|
||||||
|
"x": {
|
||||||
|
"default": 0,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "X coordinate in meters or site units."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"default": 0,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Y coordinate in meters or site units."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"z": {
|
||||||
|
"default": 0,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Z coordinate in meters or site units."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"basin": {
|
||||||
|
"volume": {
|
||||||
|
"default": "1",
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Total volume of empty basin in m3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"height": {
|
||||||
|
"default": "1",
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Total height of basin in m"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"levelUnit": {
|
||||||
|
"default": "m",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unit used for level related setpoints and thresholds."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"heightInlet": {
|
||||||
|
"default": 2,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Height of the inlet pipe measured from the basin floor (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"heightOutlet": {
|
||||||
|
"default": 0.2,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Height of the outlet pipe measured from the basin floor (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"heightOverflow": {
|
||||||
|
"default": 2.5,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Height of the overflow point measured from the basin floor (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inletPipeDiameter": {
|
||||||
|
"default": 0.4,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Nominal inlet pipe diameter (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outletPipeDiameter": {
|
||||||
|
"default": 0.4,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Nominal outlet pipe diameter (m)."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hydraulics": {
|
||||||
|
"maxInflowRate": {
|
||||||
|
"default": 200,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Maximum expected inflow during peak events (m3/h)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"refHeight": {
|
||||||
|
"default": "NAP",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "NAP",
|
||||||
|
"description": "NAP (Normaal Amsterdams Peil)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "EVRF",
|
||||||
|
"description": "EVRF (European Vertical Reference Frame)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "EGM2008",
|
||||||
|
"description": "EGM2008 / EGM96 (satellietmetingen) Geopotentieel model earth "
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"description": "Reference height to use to identify the height vs other basins with. This will say something more about the expected pressure loss in m head"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"staticHead": {
|
||||||
|
"default": 12,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Static head between station suction and discharge point (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maxDischargeHead": {
|
||||||
|
"default": 24,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Maximum allowable discharge head before calling for alarms (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pipelineLength": {
|
||||||
|
"default": 80,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Length of the discharge pipeline considered in calculations (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultFluid": {
|
||||||
|
"default": "wastewater",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "wastewater",
|
||||||
|
"description": "The wet well is primarily cylindrical."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "water",
|
||||||
|
"description": "The wet well is rectangular or box shaped."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"temperatureReferenceDegC": {
|
||||||
|
"default": 15,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Reference fluid temperature for property lookups (degC)."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"control": {
|
||||||
|
"controlStrategy": {
|
||||||
|
"default": "levelBased",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "levelBased",
|
||||||
|
"description": "Lead and lag pumps are controlled by basin level thresholds."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "pressureBased",
|
||||||
|
"description": "Pumps target a discharge pressure setpoint."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "flowTracking",
|
||||||
|
"description": "Pumps modulate to match measured inflow or downstream demand."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "manual",
|
||||||
|
"description": "Pumps are operated manually or by an external controller."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Primary control philosophy for pump actuation."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"levelSetpoints": {
|
||||||
|
"default": {
|
||||||
|
"startLeadPump": 1.2,
|
||||||
|
"stopLeadPump": 0.8,
|
||||||
|
"startLagPump": 1.8,
|
||||||
|
"stopLagPump": 1.4,
|
||||||
|
"alarmHigh": 2.3,
|
||||||
|
"alarmLow": 0.3
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Level thresholds that govern pump staging and alarms (m).",
|
||||||
|
"schema": {
|
||||||
|
"startLeadPump": {
|
||||||
|
"default": 1.2,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level that starts the lead pump."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stopLeadPump": {
|
||||||
|
"default": 0.8,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level that stops the lead pump."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"startLagPump": {
|
||||||
|
"default": 1.8,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level that starts the lag pump."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stopLagPump": {
|
||||||
|
"default": 1.4,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level that stops the lag pump."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alarmHigh": {
|
||||||
|
"default": 2.3,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "High level alarm threshold."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alarmLow": {
|
||||||
|
"default": 0.3,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Low level alarm threshold."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pressureSetpoint": {
|
||||||
|
"default": 250,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Target discharge pressure when operating in pressure control (kPa)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alarmDebounceSeconds": {
|
||||||
|
"default": 10,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Time a condition must persist before raising an alarm (seconds)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"equalizationTargetPercent": {
|
||||||
|
"default": 60,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"description": "Target fill percentage of the basin when operating in equalization mode."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoRestartAfterPowerLoss": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, pumps resume based on last known state after power restoration."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"manualOverrideTimeoutMinutes": {
|
||||||
|
"default": 30,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Duration after which a manual override expires automatically (minutes)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flowBalanceTolerance": {
|
||||||
|
"default": 5,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Allowable error between inflow and outflow before adjustments are triggered (m3/h)."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alarms": {
|
||||||
|
"default": {
|
||||||
|
"highLevel": {
|
||||||
|
"enabled": true,
|
||||||
|
"threshold": 2.3,
|
||||||
|
"delaySeconds": 30,
|
||||||
|
"severity": "critical",
|
||||||
|
"acknowledgmentRequired": true
|
||||||
|
},
|
||||||
|
"lowLevel": {
|
||||||
|
"enabled": true,
|
||||||
|
"threshold": 0.2,
|
||||||
|
"delaySeconds": 15,
|
||||||
|
"severity": "warning",
|
||||||
|
"acknowledgmentRequired": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Alarm configuration for the pumping station.",
|
||||||
|
"schema": {
|
||||||
|
"highLevel": {
|
||||||
|
"default": {
|
||||||
|
"enabled": true,
|
||||||
|
"threshold": 2.3,
|
||||||
|
"delaySeconds": 30,
|
||||||
|
"severity": "critical",
|
||||||
|
"acknowledgmentRequired": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"type": "object",
|
||||||
|
"schema": {
|
||||||
|
"enabled": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Enable or disable the high level alarm."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"threshold": {
|
||||||
|
"default": 2.3,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level threshold that triggers the high level alarm (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delaySeconds": {
|
||||||
|
"default": 30,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Delay before issuing the high level alarm (seconds)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"severity": {
|
||||||
|
"default": "critical",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "info",
|
||||||
|
"description": "Informational notification."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "warning",
|
||||||
|
"description": "Warning condition requiring attention."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "critical",
|
||||||
|
"description": "Critical alarm requiring immediate intervention."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Severity associated with the high level alarm."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acknowledgmentRequired": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, this alarm must be acknowledged by an operator."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lowLevel": {
|
||||||
|
"default": {
|
||||||
|
"enabled": true,
|
||||||
|
"threshold": 0.2,
|
||||||
|
"delaySeconds": 15,
|
||||||
|
"severity": "warning",
|
||||||
|
"acknowledgmentRequired": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"type": "object",
|
||||||
|
"schema": {
|
||||||
|
"enabled": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Enable or disable the low level alarm."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"threshold": {
|
||||||
|
"default": 0.2,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Level threshold that triggers the low level alarm (m)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delaySeconds": {
|
||||||
|
"default": 15,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"min": 0,
|
||||||
|
"description": "Delay before issuing the low level alarm (seconds)."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"severity": {
|
||||||
|
"default": "warning",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "info",
|
||||||
|
"description": "Informational notification."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "warning",
|
||||||
|
"description": "Warning condition requiring attention."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "critical",
|
||||||
|
"description": "Critical alarm requiring immediate intervention."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Severity associated with the low level alarm."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acknowledgmentRequired": {
|
||||||
|
"default": false,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, this alarm must be acknowledged by an operator."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"simulation": {
|
||||||
|
"enabled": {
|
||||||
|
"default": false,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, the station operates in simulation mode using generated inflow and level data."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mode": {
|
||||||
|
"default": "diurnal",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"value": "static",
|
||||||
|
"description": "Use constant inflow and level conditions."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "diurnal",
|
||||||
|
"description": "Use a typical diurnal inflow curve to drive simulation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "storm",
|
||||||
|
"description": "Use an elevated inflow profile representing a storm event."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Defines which synthetic profile drives the simulation."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"seed": {
|
||||||
|
"default": 42,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "Seed used for pseudo-random components in simulation."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"applyRandomNoise": {
|
||||||
|
"default": true,
|
||||||
|
"rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "If true, adds small noise to simulated measurements."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inflowProfile": {
|
||||||
|
"default": [
|
||||||
|
80,
|
||||||
|
110,
|
||||||
|
160,
|
||||||
|
120,
|
||||||
|
90
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"type": "array",
|
||||||
|
"itemType": "number",
|
||||||
|
"minLength": 1,
|
||||||
|
"description": "Relative inflow profile used when mode is set to diurnal or storm (percentage of design inflow)."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -412,6 +412,14 @@
|
|||||||
],
|
],
|
||||||
"description": "The frequency at which calculations are performed."
|
"description": "The frequency at which calculations are performed."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"flowNumber": {
|
||||||
|
"default": 1,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"nullable": false,
|
||||||
|
"description": "Defines which effluent flow of the parent node to handle."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,8 +11,12 @@ class ChildRegistrationUtils {
|
|||||||
|
|
||||||
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);
|
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);
|
||||||
|
|
||||||
// Enhanced child setup
|
// Enhanced child setup - multiple parents
|
||||||
child.parent = this.mainClass;
|
if (Array.isArray(child.parent)) {
|
||||||
|
child.parent.push(this.mainClass);
|
||||||
|
} else {
|
||||||
|
child.parent = [this.mainClass];
|
||||||
|
}
|
||||||
child.positionVsParent = positionVsParent;
|
child.positionVsParent = positionVsParent;
|
||||||
|
|
||||||
// Enhanced measurement container with rich context
|
// Enhanced measurement container with rich context
|
||||||
|
|||||||
@@ -68,6 +68,23 @@ class Measurement {
|
|||||||
return this.values[this.values.length - 1];
|
return this.values[this.values.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLaggedValue(lag){
|
||||||
|
if(this.values.length <= lag) return null;
|
||||||
|
return this.values[this.values.length - lag];
|
||||||
|
}
|
||||||
|
|
||||||
|
getLaggedSample(lag){
|
||||||
|
if (lag < 0) throw new Error('lag must be >= 0');
|
||||||
|
const index = this.values.length - 1 - lag;
|
||||||
|
if (index < 0) return null;
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: this.values[index],
|
||||||
|
timestamp: this.timestamps[index],
|
||||||
|
unit: this.unit,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
getAverage() {
|
getAverage() {
|
||||||
if (this.values.length === 0) return null;
|
if (this.values.length === 0) return null;
|
||||||
const sum = this.values.reduce((acc, val) => acc + val, 0);
|
const sum = this.values.reduce((acc, val) => acc + val, 0);
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ class MeasurementContainer {
|
|||||||
throw new Error('Variant must be specified before position');
|
throw new Error('Variant must be specified before position');
|
||||||
}
|
}
|
||||||
|
|
||||||
this._currentPosition = positionValue;
|
|
||||||
|
this._currentPosition = positionValue.toString().toLowerCase();;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -163,11 +164,55 @@ class MeasurementContainer {
|
|||||||
|
|
||||||
// Emit the exact event your parent expects
|
// Emit the exact event your parent expects
|
||||||
this.emitter.emit(`${this._currentType}.${this._currentVariant}.${this._currentPosition}`, eventData);
|
this.emitter.emit(`${this._currentType}.${this._currentVariant}.${this._currentPosition}`, eventData);
|
||||||
console.log(`Emitted event: ${this._currentType}.${this._currentVariant}.${this._currentPosition}`, eventData);
|
//console.log(`Emitted event: ${this._currentType}.${this._currentVariant}.${this._currentPosition}`, eventData);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a measurement series exists.
|
||||||
|
*
|
||||||
|
* You can rely on the current chain (type/variant/position already set via
|
||||||
|
* type().variant().position()), or pass them explicitly via the options.
|
||||||
|
*
|
||||||
|
* @param {object} options
|
||||||
|
* @param {string} [options.type] Override the current type
|
||||||
|
* @param {string} [options.variant] Override the current variant
|
||||||
|
* @param {string} [options.position] Override the current position
|
||||||
|
* @param {boolean} [options.requireValues=false]
|
||||||
|
* When true, the series must contain at least one stored value.
|
||||||
|
*
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
exists({ type, variant, position, requireValues = false } = {}) {
|
||||||
|
const typeKey = type ?? this._currentType;
|
||||||
|
if (!typeKey) return false;
|
||||||
|
|
||||||
|
const variantKey = variant ?? this._currentVariant;
|
||||||
|
if (!variantKey) return false;
|
||||||
|
|
||||||
|
const positionKey = position ?? this._currentPosition;
|
||||||
|
|
||||||
|
const typeBucket = this.measurements[typeKey];
|
||||||
|
if (!typeBucket) return false;
|
||||||
|
|
||||||
|
const variantBucket = typeBucket[variantKey];
|
||||||
|
if (!variantBucket) return false;
|
||||||
|
|
||||||
|
if (!positionKey) {
|
||||||
|
// No specific position requested – just check the variant bucket.
|
||||||
|
return requireValues
|
||||||
|
? Object.values(variantBucket).some(m => m?.values?.length > 0)
|
||||||
|
: Object.keys(variantBucket).length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const measurement = variantBucket[positionKey];
|
||||||
|
if (!measurement) return false;
|
||||||
|
|
||||||
|
return requireValues ? measurement.values?.length > 0 : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unit(unitName) {
|
unit(unitName) {
|
||||||
if (!this._ensureChainIsValid()) return this;
|
if (!this._ensureChainIsValid()) return this;
|
||||||
@@ -247,37 +292,102 @@ class MeasurementContainer {
|
|||||||
return measurement ? measurement.getAllValues() : null;
|
return measurement ? measurement.getAllValues() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLaggedValue(lag = 1,requestedUnit = null ){
|
||||||
|
const measurement = this.get();
|
||||||
|
if (!measurement) return null;
|
||||||
|
|
||||||
|
let sample = measurement.getLaggedSample(lag);
|
||||||
|
if (sample === null) return null;
|
||||||
|
const value = sample.value;
|
||||||
|
|
||||||
|
// Return as-is if no unit conversion requested
|
||||||
|
if (!requestedUnit) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert if needed
|
||||||
|
if (measurement.unit && requestedUnit !== measurement.unit) {
|
||||||
|
try {
|
||||||
|
const convertedValue = convertModule(value).from(measurement.unit).to(requestedUnit);
|
||||||
|
//replace old value in sample and return obj
|
||||||
|
sample.value = convertedValue ;
|
||||||
|
sample.unit = requestedUnit;
|
||||||
|
return sample;
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
if (this.logger) {
|
||||||
|
this.logger.error(`Unit conversion failed: ${error.message}`);
|
||||||
|
}
|
||||||
|
return sample; // Return original value if conversion fails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
getLaggedSample(lag = 1,requestedUnit = null ){
|
||||||
|
const measurement = this.get();
|
||||||
|
if (!measurement) return null;
|
||||||
|
|
||||||
|
let sample = measurement.getLaggedSample(lag);
|
||||||
|
if (sample === null) return null;
|
||||||
|
|
||||||
|
// Return as-is if no unit conversion requested
|
||||||
|
if (!requestedUnit) {
|
||||||
|
return sample;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert if needed
|
||||||
|
if (measurement.unit && requestedUnit !== measurement.unit) {
|
||||||
|
try {
|
||||||
|
const convertedValue = convertModule(value).from(measurement.unit).to(requestedUnit);
|
||||||
|
//replace old value in sample and return obj
|
||||||
|
sample.value = convertedValue ;
|
||||||
|
sample.unit = requestedUnit;
|
||||||
|
return sample;
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
if (this.logger) {
|
||||||
|
this.logger.error(`Unit conversion failed: ${error.message}`);
|
||||||
|
}
|
||||||
|
return sample; // Return original value if conversion fails
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sample;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Difference calculations between positions
|
// Difference calculations between positions
|
||||||
difference(requestedUnit = null) {
|
difference({ from = "downstream", to = "upstream", unit: requestedUnit } = {}) {
|
||||||
|
|
||||||
if (!this._currentType || !this._currentVariant) {
|
if (!this._currentType || !this._currentVariant) {
|
||||||
throw new Error('Type and variant must be specified for difference calculation');
|
throw new Error("Type and variant must be specified for difference calculation");
|
||||||
}
|
}
|
||||||
const upstream = this.measurements?.[this._currentType]?.[this._currentVariant]?.['upstream'] || null;
|
|
||||||
const downstream = this.measurements?.[this._currentType]?.[this._currentVariant]?.['downstream'] || null;
|
|
||||||
|
|
||||||
if (!upstream || !downstream || upstream.values.length === 0 || downstream.values.length === 0) {
|
const get = pos =>
|
||||||
|
this.measurements?.[this._currentType]?.[this._currentVariant]?.[pos] || null;
|
||||||
|
|
||||||
|
const a = get(from);
|
||||||
|
const b = get(to);
|
||||||
|
if (!a || !b || a.values.length === 0 || b.values.length === 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get target unit for conversion
|
const targetUnit = requestedUnit || a.unit || b.unit;
|
||||||
const targetUnit = requestedUnit || upstream.unit || downstream.unit;
|
const aVal = this._convertValueToUnit(a.getCurrentValue(), a.unit, targetUnit);
|
||||||
|
const bVal = this._convertValueToUnit(b.getCurrentValue(), b.unit, targetUnit);
|
||||||
|
|
||||||
// Get values in the same unit
|
const aAvg = this._convertValueToUnit(a.getAverage(), a.unit, targetUnit);
|
||||||
const upstreamValue = this._convertValueToUnit(upstream.getCurrentValue(), upstream.unit, targetUnit);
|
const bAvg = this._convertValueToUnit(b.getAverage(), b.unit, targetUnit);
|
||||||
const downstreamValue = this._convertValueToUnit(downstream.getCurrentValue(), downstream.unit, targetUnit);
|
|
||||||
|
|
||||||
const upstreamAvg = this._convertValueToUnit(upstream.getAverage(), upstream.unit, targetUnit);
|
|
||||||
const downstreamAvg = this._convertValueToUnit(downstream.getAverage(), downstream.unit, targetUnit);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
value: downstreamValue - upstreamValue,
|
value: aVal - bVal,
|
||||||
avgDiff: downstreamAvg - upstreamAvg,
|
avgDiff: aAvg - bAvg,
|
||||||
unit: targetUnit
|
unit: targetUnit,
|
||||||
|
from,
|
||||||
|
to,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper methods
|
// Helper methods
|
||||||
_ensureChainIsValid() {
|
_ensureChainIsValid() {
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ autoContainer
|
|||||||
.distance(0.5)
|
.distance(0.5)
|
||||||
.value(1.5, Date.now(), 'bar'); // Input: 1.5 bar → Auto-stored as ~21.76 psi
|
.value(1.5, Date.now(), 'bar'); // Input: 1.5 bar → Auto-stored as ~21.76 psi
|
||||||
|
|
||||||
|
|
||||||
const converted = autoContainer
|
const converted = autoContainer
|
||||||
.type('pressure')
|
.type('pressure')
|
||||||
.variant('measured')
|
.variant('measured')
|
||||||
@@ -175,6 +176,25 @@ const downstreamData = basicContainer
|
|||||||
.position('downstream')
|
.position('downstream')
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
|
//check wether a serie exists
|
||||||
|
const hasSeries = measurements
|
||||||
|
.type("flow")
|
||||||
|
.variant("measured")
|
||||||
|
.exists(); // true if any position exists
|
||||||
|
|
||||||
|
const hasUpstreamValues = measurements
|
||||||
|
.type("flow")
|
||||||
|
.variant("measured")
|
||||||
|
.exists({ position: "upstream", requireValues: true });
|
||||||
|
|
||||||
|
// Passing everything explicitly
|
||||||
|
const hasPercent = measurements.exists({
|
||||||
|
type: "volume",
|
||||||
|
variant: "percent",
|
||||||
|
position: "atEquipment",
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log(`Downstream: ${downstreamVal} ${downstreamData.unit} at ${downstreamData.distance}m\n`);
|
console.log(`Downstream: ${downstreamVal} ${downstreamData.unit} at ${downstreamData.distance}m\n`);
|
||||||
|
|
||||||
// ====================================
|
// ====================================
|
||||||
@@ -213,6 +233,10 @@ const pressureDiff = basicContainer
|
|||||||
|
|
||||||
console.log(`Pressure difference: ${pressureDiff.value} ${pressureDiff.unit}\n`);
|
console.log(`Pressure difference: ${pressureDiff.value} ${pressureDiff.unit}\n`);
|
||||||
|
|
||||||
|
//reversable difference
|
||||||
|
const deltaP = basicContainer.type("pressure").variant("measured").difference(); // defaults to downstream - upstream
|
||||||
|
const netFlow = basicContainer.type("flow").variant("measured").difference({ from: "upstream", to: "downstream" });
|
||||||
|
|
||||||
// ====================================
|
// ====================================
|
||||||
// ADVANCED STATISTICS & HISTORY
|
// ADVANCED STATISTICS & HISTORY
|
||||||
// ====================================
|
// ====================================
|
||||||
@@ -248,6 +272,28 @@ const allValues = stats.getAllValues();
|
|||||||
console.log(` Samples: ${allValues.values.length}`);
|
console.log(` Samples: ${allValues.values.length}`);
|
||||||
console.log(` History: [${allValues.values.join(', ')}]\n`);
|
console.log(` History: [${allValues.values.join(', ')}]\n`);
|
||||||
|
|
||||||
|
console.log('--- Lagged sample comparison ---');
|
||||||
|
|
||||||
|
const latest = stats.getCurrentValue(); // existing helper
|
||||||
|
const prevSample = stats.getLaggedValue(1); // new helper
|
||||||
|
const prevPrevSample = stats.getLaggedValue(2); // optional
|
||||||
|
|
||||||
|
if (prevSample) {
|
||||||
|
const delta = latest - prevSample.value;
|
||||||
|
console.log(
|
||||||
|
`Current vs previous: ${latest} ${statsData.unit} (t=${stats.get().getLatestTimestamp()}) vs ` +
|
||||||
|
`${prevSample.value} ${prevSample.unit} (t=${prevSample.timestamp})`
|
||||||
|
);
|
||||||
|
console.log(`Δ = ${delta.toFixed(2)} ${statsData.unit}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prevPrevSample) {
|
||||||
|
console.log(
|
||||||
|
`Previous vs 2-steps-back timestamps: ${new Date(prevSample.timestamp).toISOString()} vs ` +
|
||||||
|
`${new Date(prevPrevSample.timestamp).toISOString()}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// ====================================
|
// ====================================
|
||||||
// DYNAMIC UNIT MANAGEMENT
|
// DYNAMIC UNIT MANAGEMENT
|
||||||
// ====================================
|
// ====================================
|
||||||
@@ -299,8 +345,11 @@ basicContainer.getTypes().forEach(type => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log('\n✅ All examples complete!\n');
|
console.log('\n✅ All examples complete!\n');
|
||||||
|
|
||||||
|
|
||||||
// ====================================
|
// ====================================
|
||||||
// BEST PRACTICES
|
// BEST PRACTICES
|
||||||
// ====================================
|
// ====================================
|
||||||
|
|||||||
@@ -350,6 +350,7 @@ class Predict {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildAllFxyCurves(curve) {
|
buildAllFxyCurves(curve) {
|
||||||
|
|
||||||
let globalMinY = Infinity;
|
let globalMinY = Infinity;
|
||||||
let globalMaxY = -Infinity;
|
let globalMaxY = -Infinity;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user