code wiki / _hdl_build / nx_lifecycle.nx
nx_lifecycle.nx
buildroot/runtime/_hdl_build/nx_lifecycle.nx
about
nx_lifecycle.nx -- LIB: the WEAR / REPAIR / ETERNAL lifecycle twin. Adds the time dimension to the product twin:
per part a wear life (days), a part cost and a LABOR (effort) cost to replace, and whether it is replaceable. From
these the system is judged in three regimes (operator's framing):
ETERNAL -- every part replaceable -> the system lasts forever, swapped piece by piece (Ship of Theseus).
EVOLVING -- each replacement uses a BETTER part -> capability ratchets up over cycles.
LIMITED -- when the LABOR to replace exceeds the part cost, early refresh wastes effort, so replacement is
RECOMMENDED only after X days (at wear-out); a non-replaceable part caps the whole system's life.
never-brick #26: pure arithmetic, bounded, deterministic. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_lifecycle_gate.nx
structs
| none |
consts
| none |
functions
| 12 | func lc_is_eternal(replaceable: *i64, n: i64) -> i64 called by 1: main |
| 19 | func lc_bottleneck_life(lifespan: *i64, replaceable: *i64, n: i64) -> i64 called by 1: main |
| 33 | func lc_replace_day(lifespan: i64, part_cost: i64, labor_cost: i64) -> i64 called by 1: main |
| 39 | func lc_evolving_cap(base: i64, gain: i64, cycles: i64) -> i64 { return base + gain * cycles } called by 1: main |
| 42 | func lc_maint_cost(part_cost: i64, labor_cost: i64, horizon: i64, lifespan: i64) -> i64 called by 1: main |