Compare commits
28 Commits
428c611ec6
...
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 | ||
| 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": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -206,21 +206,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"basin": {
|
"basin": {
|
||||||
"shape": {
|
"volume": {
|
||||||
"default": "cylindrical",
|
"default": "1",
|
||||||
"rules": {
|
"rules": {
|
||||||
"type": "enum",
|
"type": "number",
|
||||||
"values": [
|
"description": "Total volume of empty basin in m3"
|
||||||
{
|
}
|
||||||
"value": "cylindrical",
|
},
|
||||||
"description": "The wet well is primarily cylindrical."
|
"height": {
|
||||||
},
|
"default": "1",
|
||||||
{
|
"rules": {
|
||||||
"value": "rectangular",
|
"type": "number",
|
||||||
"description": "The wet well is rectangular or box shaped."
|
"description": "Total height of basin in m"
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "General geometry of the basin or wet well."
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"levelUnit": {
|
"levelUnit": {
|
||||||
@@ -272,7 +269,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hydraulics": {
|
"hydraulics": {
|
||||||
|
|
||||||
"maxInflowRate": {
|
"maxInflowRate": {
|
||||||
"default": 200,
|
"default": 200,
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -281,6 +277,28 @@
|
|||||||
"description": "Maximum expected inflow during peak events (m3/h)."
|
"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": {
|
"staticHead": {
|
||||||
"default": 12,
|
"default": 12,
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -168,6 +169,50 @@ class MeasurementContainer {
|
|||||||
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,38 +292,103 @@ 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) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get target unit for conversion
|
|
||||||
const targetUnit = requestedUnit || upstream.unit || downstream.unit;
|
|
||||||
|
|
||||||
// Get values in the same unit
|
|
||||||
const upstreamValue = this._convertValueToUnit(upstream.getCurrentValue(), upstream.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 {
|
|
||||||
value: downstreamValue - upstreamValue,
|
|
||||||
avgDiff: downstreamAvg - upstreamAvg,
|
|
||||||
unit: targetUnit
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
const targetUnit = requestedUnit || a.unit || b.unit;
|
||||||
|
const aVal = this._convertValueToUnit(a.getCurrentValue(), a.unit, targetUnit);
|
||||||
|
const bVal = this._convertValueToUnit(b.getCurrentValue(), b.unit, targetUnit);
|
||||||
|
|
||||||
|
const aAvg = this._convertValueToUnit(a.getAverage(), a.unit, targetUnit);
|
||||||
|
const bAvg = this._convertValueToUnit(b.getAverage(), b.unit, targetUnit);
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: aVal - bVal,
|
||||||
|
avgDiff: aAvg - bAvg,
|
||||||
|
unit: targetUnit,
|
||||||
|
from,
|
||||||
|
to,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Helper methods
|
// Helper methods
|
||||||
_ensureChainIsValid() {
|
_ensureChainIsValid() {
|
||||||
if (!this._currentType || !this._currentVariant || !this._currentPosition) {
|
if (!this._currentType || !this._currentVariant || !this._currentPosition) {
|
||||||
|
|||||||
@@ -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