nx_bom_rt.nx
buildroot/runtime/nx_bom_rt.nx
about
nx_bom.nx -- GO-TO-MARKET / BILL OF MATERIALS engine. The first hardware
rung made concrete: turn a gated DESIGN into a buildable bench prototype
-- the real components, their cost, mass, lead time, and make-vs-buy --
with rollups (total cost, total mass, the longest-lead CRITICAL-PATH
item that gates the build schedule) and per-category subtotals. Generic
across any product; instantiated here for the water AWG bench prototype
(advances water-system from MRL 2 toward MRL 3 = manufacturing proof of
concept).
INTEGER-EXACT: cost in cents, mass in grams, lead time in days. The
enclosure is MAKE (we 3D-print it with our own CAD/G-code capability =
vertical integration), everything else is BUY.
grounded: bill_of_materials + design_for_manufacturability + contract_manufacture
genealogy_id: bill_of_materials_bench_prototype + nishi_go_to_market
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_market_rt.nx
structs
| 53 | struct NxPart |
| 92 | struct NxBom |
consts
| 21 | const BC_HARVEST: i64 = 0 // cooler + fans + prefilter (pull water from air) |
| 22 | const BC_COLLECT: i64 = 1 // tray + tubing + pump + tank |
| 23 | const BC_TREAT: i64 = 2 // UV-C + carbon (make it safe) |
| 24 | const BC_MINERAL: i64 = 3 // remineralization media (make it taste + healthful) |
| 25 | const BC_CONTROL: i64 = 4 // MCU + sensors + power + wiring |
| 26 | const BC_ENCLOSURE: i64 = 5 // the case (we print it) |
| 28 | const BM_BUY: i64 = 0 |
| 29 | const BM_MAKE: i64 = 1 |
| 33 | const BP_PELTIER: i64 = 0 |
| 34 | const BP_HEATSINK_FAN: i64 = 1 |
| 35 | const BP_INTAKE_FAN: i64 = 2 |
| 36 | const BP_PREFILTER: i64 = 3 |
| 37 | const BP_TRAY: i64 = 4 |
| 38 | const BP_TUBING: i64 = 5 |
| 39 | const BP_PUMP: i64 = 6 |
| 40 | const BP_UVC_LED: i64 = 7 |
| 41 | const BP_CARBON: i64 = 8 |
| 42 | const BP_MINERAL_CART: i64 = 9 |
| 43 | const BP_TANK: i64 = 10 |
| 44 | const BP_MCU: i64 = 11 |
| 45 | const BP_SENSORS: i64 = 12 |
| 46 | const BP_PSU: i64 = 13 |
| 47 | const BP_ENCLOSURE: i64 = 14 |
| 48 | const BP_WIRING: i64 = 15 |
| 49 | const BP_N: i64 = 16 |
functions
| 62 | func nx_bom_part(id: i64) -> *NxPart |
| 100 | func nx_bom_new() -> *NxBom |
| 110 | func nx_bom_add(b: *NxBom, part_id: i64, qty: i64) -> i64 |
| 124 | func nx_bom_water_count() -> i64 |
| 128 | func nx_bom_water_qty_at(i: i64) -> i64 |
| 133 | func nx_bom_water_assemble() -> *NxBom called by 1: mk_water_production_cost calls 4: nx_bom_newnx_bom_water_countnx_bom_addnx_bom_water_qty_at |
| 144 | func nx_bom_water_category_cost(cat: i64) -> i64 |
| 156 | func nx_bom_critical_path_days(b: *NxBom) -> i64 |