code wiki / _hdl_build / nx_batt_planner.nx

nx_batt_planner.nx

buildroot/runtime/_hdl_build/nx_batt_planner.nx

3595 B84 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind librarytopic batt
docsdependenciesstructsconstsfunctions

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

nx_batt_planner.nx nx_batt_planner_test.nx

imports: none

imported by: nx_batt_planner_test.nx

structs

12struct ModelScenario
27struct RiskCfg
38struct PlanResult

consts

none

functions

50func nx_plan_risk_score(ms: *ModelScenario, rc: *RiskCfg) -> i64
called by 1: nx_plan_eval
55func nx_plan_eval(ms: *ModelScenario, rc: *RiskCfg, out: *PlanResult) -> i64
called by 1: main calls 1: nx_plan_risk_score