code wiki / _hdl_build / nx_batt_bizplan.nx

nx_batt_bizplan.nx

buildroot/runtime/_hdl_build/nx_batt_bizplan.nx

16935 B145 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic batt
docsdependenciesstructsconstsfunctions

about

nx_batt_bizplan.nx -- R4 BUSINESS-PLAN ASSEMBLER. EMITS (author-by-organ, [[feedback-author-by-organ-not-claude]]) a complete, self-contained HTML business plan for the Li-ion reclamation shop, COMPOSING the prior work: the planner's model choice (HYBRID), the finmodel's grounded numbers (via the shared nx_batt_econ core = no drift), and the chart (the real SVG is READ from disk and embedded inline = real composition). Every figure tagged VERIFIED vs assumption; the adversarial fragility is stated, not hidden. Zero 3rd-party JS. Output -> knowledge/library/ (foundationable via nx_library_foundation). Build: _offc/nx_sov_build_run.elf nx_batt_bizplan license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_debt_payoff.nx nx_batt_econ.nx nx_batt_bizplan.nx

imports: nx_debt_payoff.nxnx_batt_econ.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_wr gp be_base_net be_scenario_net be_gross_base be_base_net ↻ be_payoff_months be_scenario_net ↻ ws wm mny_format mny_wdec sys_mmap wn rdcopy sys_read arow ws ↻ wm ↻ wn ↻ be_payoff_months ↻ gn sys_read ↻ have

structs

none

consts

none

functions

11func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
12func gn(v0: i64) -> i64 { var v: i64=v0; if v<0{sys_write(1,"-" as *u8,1);v=0-v} let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 1: main
13func ws(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return n }
called by 2: arowmain
14func wn(fd: i64, v0: i64) -> i64 { var v: i64=v0; var c: i64=0; if v<0{sys_write(fd,"-" as *u8,1);c=c+1;v=0-v} let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(fd,o,k); return c+k }
called by 2: arowmain
15func wm(fd: i64, c0: i64) -> i64 { var x: i64=c0; if x<0{sys_write(fd,"-$" as *u8,2);x=0-x}else{sys_write(fd,"$" as *u8,1)} let buf: *u8=sys_mmap(32); let n: i64=mny_format(x,buf); sys_write(fd,buf,n); return 0 }
called by 2: arowmain calls 1: mny_format
16func rdcopy(fd_out: i64, path: *u8) -> i64
called by 1: main calls 1: sys_read
23func have(p: *u8) -> i64 { let fd: i64=sys_openat_rd(p); if fd<0 { return 0 } sys_close(fd); return 1 }
called by 1: main
25func arow(fd: i64, name: *u8, net: i64, capex: i64) -> i64
called by 1: main calls 4: wswmwnbe_payoff_months
35func main() -> i64