code wiki / (root) / nx_maint_simloop.nx

nx_maint_simloop.nx

buildroot/runtime/nx_maint_simloop.nx

4411 B98 linesdepth 4pulls 9 transitivereach 3 importersview sourcekind librarytopic maint
docsdependenciesstructsconstsfunctions

about

nx_maint_simloop.nx -- the CLOSED-LOOP DIGITAL-TWIN SIMULATOR + learning loop. Proves the whole maintenance platform IN SOFTWARE, reproducibly, with NO IRL spend -- the operator's real goal: simulate first, prove via modeling, then (optionally) validate on hardware. Operator (2026-06-23): "use software to simulate these things ... most systems have an emission loop ... we want a full learning loop ... a good example is OBD [which] just tells you errors but then you need 3rd parties to make the data meaningful, actionable, reproducible." Grounded in the sovereign research (knowledge/fetched/maint_*: digital_twin, control_loop, feedback, predictive_ maintenance, prognostics, on-board_diagnostics): S-class CLOSES the loop with a digital twin + feedback control; OBD is OPEN-loop. THE LOOP (per cycle): twin wears -> generate a sensor reading -> run the REAL pipeline (nx_hvac_analyze_core -> nx_maint_severity -> nx_plan_for) -> CLOSE THE LOOP: a fix/replace action feeds back and RESETS the wear -> the next cycle SELF-VERIFIES the asset recovered. Open-loop (no feedback) just degrades and stays broken (OBD); the closed loop self-maintains = the measured EXCEED. NEVER-BRICK (#26): pure simulation; no syscalls, no device writes. genealogy_id: project-maintenance-platform-sclass-2026-06-23 (closed-loop sim; researcher-grounded) license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_maint_action.nx nx_maint_simloop.nx nx_maint_simloop_test.nx nx_maint_simpage.nx

imports: nx_maint_action.nx

imported by: nx_maint_simloop_test.nxnx_maint_simpage.nx

structs

32struct TwinThermal

consts

26const K_MAGIC_1800: i64 = 1800
27const K_MAGIC_19000: i64 = 19000
28const K_MAGIC_5000: i64 = 5000

functions

41func nx_twin_init(tw: *TwinThermal, base_resp: i64, wear_per_cycle: i64) -> i64
called by 2: mainmain
55func nx_sim_run(tw: *TwinThermal, apply_fix: i64, n_cycles: i64,