code wiki / _hdl_build / nx_batt_econ.nx

nx_batt_econ.nx

buildroot/runtime/_hdl_build/nx_batt_econ.nx

1739 B29 linesdepth 0pulls 0 transitivereach 2 importersview sourcekind librarytopic batt
docsdependenciesstructsconstsfunctions

about

nx_batt_econ.nx -- shared economic CORE for the battery-reclamation finance organs (DRY #15). Pure i64 cents, no-float, NO imports. Both nx_batt_finmodel (the workup) and nx_batt_bizplan (the written plan) compute from THIS single source, so the plan can NEVER drift from the model. Constants are itemized + line-summed in nx_batt_finmodel (its gate asserts the sum == these); figures grounded in knowledge/research/2026-06-23-battery-reclaim-cost-basis.md (verified anchors + flagged assumptions). license_tier: ORIGINAL

dependencies 0 imports · 2 importers

nx_batt_econ.nx nx_batt_bizplan.nx nx_batt_finmodel.nx

imports: none

imported by: nx_batt_bizplan.nxnx_batt_finmodel.nx

structs

none

consts

7const BE_CAPEX_TOTAL: i64 = 4148800 // $41,488.00 initial investment (itemized in nx_batt_finmodel)
8const BE_OPEX_TOTAL: i64 = 880000 // $8,800.00 / mo operating cost (itemized in nx_batt_finmodel)

functions

12func be_scenario_net(cell_c: i64, price_pct: i64, demand_pct: i64, extra_opex: i64) -> i64
called by 3: mainbe_base_netmain
24func be_base_net() -> i64 { return be_scenario_net(529, 100, 100, 0) }
25func be_gross_base() -> i64 { return be_base_net() + BE_OPEX_TOTAL }
called by 2: mainmain calls 1: be_base_net
26func be_payoff_months(capex: i64, net: i64) -> i64
called by 4: arowmainslinemain