code wiki / _hdl_build / nx_supplychain_case.nx

nx_supplychain_case.nx

buildroot/runtime/_hdl_build/nx_supplychain_case.nx

2050 B35 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_supplychain_case.nx -- LIB: the Nishi-analyst DOMESTIC SUPPLY-CHAIN SECURITY + GOOD-JOBS business case. Adds the geopolitical + labor dimensions to the supply-chain twin so the analyst/business-case builder can present a domestic plan to city/state/federal government. Per component: country of ORIGIN (0 domestic, 1 allied, 2 adversary), ENERGY risk (0-100), SINGLE-SOURCE flag, value. Computes value-weighted supply-chain RISK and DOMESTIC content, and the reshoring case: jobs at a LIVING WAGE with European-exceeding benefits (healthcare, PTO) and home affordability. never-brick #26: pure arithmetic, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_supplychain_case.nx nx_sourcing_path.nx nx_supply_case.nx nx_supplychain_case_gate.nx

imports: nx_syscalls.nx

imported by: nx_sourcing_path.nxnx_supply_case.nxnx_supplychain_case_gate.nx

structs

none

consts

none

functions

10func sc_domestic_permil(origin: *i64, value: *i64, n: i64) -> i64
19func sc_weighted_risk(origin: *i64, energy_risk: *i64, single_source: *i64, value: *i64, n: i64) -> i64
32func sc_payroll(jobs: i64, annual_wage: i64) -> i64 { return jobs*annual_wage }
called by 3: sc_selftestmainmain
33func sc_benefits(payroll: i64, pct: i64) -> i64 { return payroll*pct/100 }
called by 3: sc_selftestmainmain
35func sc_home_afford(median_home: i64, annual_wage: i64) -> i64 { if annual_wage<=0 { return 0-1 } return median_home/annual_wage }
called by 3: sc_selftestmainmain