code wiki / _hdl_build / nx_batt_planner.nx
nx_batt_planner.nx
buildroot/runtime/_hdl_build/nx_batt_planner.nx
about
nx_batt_planner.nx -- R4 PROFIT/RISK PLANNING TOOL. Operator: "id be curious about the profit risk etc thats why
i want planning tools." Compares candidate business models so the NUMBERS (not opinion) inform the model choice.
Each model = a DATA-DRIVEN ModelScenario (#11 -- every input is data, no magic). The engine computes, per model:
PROFIT: monthly revenue, net monthly profit, margin (per-mille), break-even months (ceil; -1 = never).
RISK: a weighted composite score (0..100, fire-safety weighted highest = the operator's #1 priority) + flags
NET-NEGATIVE / HIGH-FIRE / CAPITAL-HEAVY / SLOW-BREAKEVEN.
NO-FLOAT by construction (exact i64 cents -- the nx_money discipline; floats are WRONG for money). Mirrors the
nx_fin_finance risk-flag + rank pattern (DRY #15). HONEST: the ENGINE is the deliverable; the input numbers are
ESTIMATES until R1 intake / R2 recondition / R3 facility ground real prices, COGS, throughput, and capital.
Read-only, never-brick #26. license_tier: ORIGINAL
dependencies 0 imports · 1 importers
imports: none
imported by: nx_batt_planner_test.nx
structs
| 12 | struct ModelScenario |
| 27 | struct RiskCfg |
| 38 | struct PlanResult |
consts
| none |
functions
| 50 | func nx_plan_risk_score(ms: *ModelScenario, rc: *RiskCfg) -> i64 called by 1: nx_plan_eval |
| 55 | func nx_plan_eval(ms: *ModelScenario, rc: *RiskCfg, out: *PlanResult) -> i64 |