Commit Graph

33 Commits

Author SHA1 Message Date
znetsixe
f8f71a4f1c schema + asset menu fixes
- configs/machineGroupControl.json: drop prioritypercentagecontrol mode
  (unused — set.demand became unit-self-describing, so percentage-vs-absolute
  is decided per-message, not by a node-wide scaling mode). Add output.process
  / output.dbase enums + functionality.distance{,Unit,Description} so the
  editor's distance offset persists. Fixes the runtime warnings 'Unknown key
  optimization/scaling/movement/curvePressureUnit etc.' the validator was
  logging on every MGC instantiation.
- configs/measurement.json: same output.process/dbase block + nullable
  position.x for the rare case a measurement has no parent yet.
- datasets/assetData/machine.json -> rotatingmachine.json: rename so
  AssetMenu's softwareType lookup matches. AssetMenu.getActiveCategoryKey
  no longer silently falls back to keys[0] (which mis-showed diffuser models
  for rotatingMachine nodes) — returns null with a console.warn instead.
- menu/asset.js: re-derive supplier/assetType from saved model id on reopen.
  The save handler intentionally discards the denormalized registry copies
  to keep the persisted node small, so the cascade dropdown booted at
  'Select...' even when a model was saved. Walk the registry tree to
  reconstitute.
- predict/predict_class.js: minor.
- configs/index.js: minor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:51:57 +02:00
znetsixe
c59da5ca98 refactor(curves): canonical axis Nm³/(h·m² membrane) for all diffuser suppliers
Previously each curve file stored x in whatever convention the vendor
used (per-element Nm³/h for Jäger/GVA, per-element Sm³/h for PIK/PRK,
per-m² for Aerostrip). That meant the diffuser physics couldn't read
the data uniformly — selecting Aerostrip vs Jäger would feed wildly
different axes to the same interpolator.

All five curves now use the same canonical X: specific air flux in
Nm³/(h·m² membrane). Y stays SSOTR in g O₂/(Nm³·m); coverage % is the
parametric key.

Per-file conversions:
- jaeger-jetflex-td-65-2-g-epdm-1000: x divided by 0.18 m² perforated
  area (stated on the data sheet).
- gva-elastox-r: x divided by 0.18 m² placeholder mirroring Jäger
  TD-65 (no real GVA sheet exists — see _meta note).
- aerostrip-phoenix: native already in Nm³/(h·m²) — no x change. _meta
  area normalised to 1.0 m² per "element" so users set `elements` =
  total installed membrane area in m².
- pik300, prk300 (Sulzer ABS 300 mm disc): native was Sm³/h/disc on
  X and g O₂/(Sm³·m) on Y. Converted to canonical Nm³ basis (DIN-1343)
  by X × 0.9319 / 0.07, Y × 1.0732. Each disc = 0.07 m² membrane.

Supplier naming fixed: pikprk → sulzer, aquaconsult → aquaconsult-entec.
PIK = perforated EPDM, PRK = perforated PUR.

Config schema: new diffuser.membraneAreaPerElement field (nullable,
default null) so a node can override the curve's stored area. When
null, specificClass reads _meta.membraneArea_m2_per_element from the
resolved curve.

246/246 generalFunctions tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:16:34 +02:00
znetsixe
0a4b52f517 feat(registry): AssetResolver + diffuser supplier curves (Jäger / Aerostrip / PIK / PRK)
Two related changes bundled together because the diffuser curve files
only make sense once the registry namespace they live in exists.

src/registry — new asset-metadata resolver:
- AssetResolver with synchronous resolve(namespace, id) + lazy cache,
  async refresh() for future remote pulls.
- FileBackend (per-id or single-file layouts, case-insensitive) and a
  stub HttpBackend (disabled unless EVOLV_ASSET_REMOTE=1).
- Namespaces: curves, menu, monsterSamples, monsterSpecs, units. Menu
  namespace re-keys by inner softwareType + filename so editors that
  pass either string resolve to the same tree.
- README explains how to add a namespace.
- AssetCategoryManager (datasets/assetData/index.js) becomes a thin
  facade over the resolver so existing consumers don't move.
- 246/246 tests pass — including the 39-test registry suite.

datasets/assetData — file moves + new diffuser data:
- modelData/*.json deleted; curves/*.json is the canonical home.
- New diffuser.json menu tree with GVA, Jäger, Aquaconsult/Entec,
  PIK/PRK suppliers.
- gva-elastox-r.json migrated from the inline _loadSpecs hardcode,
  re-tagged coverageBasis="bottom-coverage-pct" (the legacy 2.4
  elements/m² was a prior mis-conversion; we can't recover the
  original % so it's a single-point curve under key "0").
- jaeger-jetflex-td-65-2-g-epdm-1000.json — extracted from the Jäger
  EPDM-1000mm SSOTE/DWP chart on the data sheet (vector-PDF read).
  SSOTE 8.20→6.40 %/m, DWP 25→48 mbar across Q 2-12 Nm³/h. Single
  coverage (vendor doesn't state test conditions).
- aerostrip-phoenix.json — 4-coverage SOTE family at 4.75 m water
  depth (DD 5/10/15/20 %, flux 10-70 Nm³/h·m²) from the Entec/de
  Winter 2023-11-22 dataset; DWP curve from the 21 % @ 4.05 m chart.
- pik300.json / prk300.json — 5-coverage SOTE + SSOTR (DD 5-25 %)
  with split DWP per model variant, water depth ≈ 4.0 m inferred from
  the SOTE↔SSOTR ratio in the source spreadsheet.

src/configs/diffuser.json:
- New asset.{model, assetTagNumber} block so the editor's selected
  model id survives validation.
- diffuser.density description corrected to "Bottom coverage [%]";
  default 2.4 → 15 (typical fine-bubble install).

src/configs/{rotatingMachine,valve}.json: small alignment edits that
came with the registry phase.

src/menu/asset.js + src/menu/aquonSamples.js: rewritten as facades
over assetResolver, keeping the editor-side cascade behaviour intact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:12:13 +02:00
znetsixe
024db5533a fix: correct 3 anomalous power values in hidrostal-H05K-S03R curve
At pressures 1600, 3200, and 3300 mbar, flow values had leaked into the
np (power) section. Replaced with linearly interpolated values from
adjacent pressure levels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 13:37:06 +02:00
znetsixe
f96476bd23 Merge commit '12fce6c' into HEAD
# Conflicts:
#	index.js
#	src/configs/index.js
#	src/configs/machineGroupControl.json
#	src/helper/assetUtils.js
#	src/helper/childRegistrationUtils.js
#	src/helper/configUtils.js
#	src/helper/logger.js
#	src/helper/menuUtils.js
#	src/helper/menuUtils_DEPRECATED.js
#	src/helper/outputUtils.js
#	src/helper/validationUtils.js
#	src/measurements/Measurement.js
#	src/measurements/MeasurementContainer.js
#	src/measurements/examples.js
#	src/outliers/outlierDetection.js
2026-03-31 18:07:57 +02:00
Rene De Ren
bf39b9df42 Fix sorting bug in validationUtils and add cache cap to AssetLoader
- validationUtils: unsorted x values now actually sorted (was returning false)
- validationUtils: duplicate x values now actually removed (was returning false)
- validationUtils: areNumbers check no longer skipped after sort/dedup
- AssetLoader: add maxCacheSize (default 100) with LRU-style eviction

Closes #21, closes #24

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:07:16 +01:00
znetsixe
27a6d3c709 updates 2026-03-11 11:13:05 +01:00
znetsixe
15c33d650b updates 2026-01-29 09:16:41 +01:00
znetsixe
266a6ed4a3 updates 2026-01-28 14:04:22 +01:00
znetsixe
37796c3e3b Merge remote-tracking branch 'origin/main' into dev-Rene 2025-12-19 11:50:14 +01:00
pimmoerman
858189d6da Update get_all_assets.php vanaf tagcode.app 2025-11-21 03:00:01 +00:00
pimmoerman
ec42ebcb25 Update get_all_assets.php vanaf tagcode.app 2025-11-20 12:15:55 +00:00
pimmoerman
f4629e5fcc Update get_all_assets.php vanaf extern endpoint 2025-11-17 15:57:29 +00:00
pimmoerman
dafe4c5336 Delete datasets/tagcodeapp_product_models.json 2025-11-17 15:57:15 +00:00
pimmoerman
5439d5111a Delete datasets/tagcodeapp_assets.json 2025-11-17 15:57:08 +00:00
pimmoerman
1e5ef47a4d Delete datasets/get_all_assets.php 2025-11-17 15:57:02 +00:00
pimmoerman
2b87c67876 Update get_all_assets.php vanaf extern endpoint 2025-11-17 15:00:01 +00:00
znetsixe
f2c9134b64 Added new menu jsons 2025-11-13 19:39:48 +01:00
p.vanderwilt
ce25ee930a Add ammonium and NOx quantity sensors to assetData 2025-11-12 10:47:41 +01:00
znetsixe
4a489acd89 some formatting 2025-11-06 16:47:17 +01:00
p.vanderwilt
a293e0286a Merge pull request 'Add addtional and updated configs' (#12) from dev-Pieter into main
Reviewed-on: https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions/pulls/12
2025-11-06 14:01:32 +00:00
znetsixe
9610e7138d Added extra pump data
lagged sample in measurement
2025-11-03 15:22:51 +01:00
p.vanderwilt
17662ef7cb Add total suspended solids sensor to assetData 2025-10-31 13:53:35 +01:00
p.vanderwilt
b2b811e802 Add test oxygen sensor to assets 2025-09-26 14:29:14 +02:00
jenkins-bot
e1c6124cf0 Automatische update van tagcodeapp bestanden via Jenkins 2025-08-07 18:06:01 +00:00
znetsixe
2540d19b76 updates to accomodate valve node 2025-07-24 13:17:10 +02:00
znetsixe
a2018509ef updates to make generic functions work 2025-07-01 17:05:09 +02:00
znetsixe
5ca7889af1 added curve menu and lookup index perhaps need to do the same for asset lookup later? 2025-07-01 15:26:02 +02:00
znetsixe
fe9a2c0e7c Merge branch 'main' of https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions
the to standaardize commit.
2025-06-25 10:56:54 +02:00
znetsixe
3198690a81 standaardisation updates 2025-06-25 10:55:50 +02:00
jenkins-bot
9e74f850c5 Automatische update van tagcodeapp bestanden via Jenkins 2025-06-24 07:53:15 +00:00
jenkins-bot
d409e16cc4 Automatische update van tagcodeapp_assets.json via Jenkins 2025-06-24 07:50:21 +00:00
znetsixe
2e57034f14 Complete general functions 2025-05-26 17:09:18 +02:00