nx_caplab_quality.nx
buildroot/runtime/nx_caplab_quality.nx
about
nx_caplab_quality.nx -- Capitalism Lab R4: demand driven by PRICE + QUALITY +
BRAND (the heart of Capitalism Lab -- customers don't just buy the cheapest;
a higher-quality, better-branded product wins share even at a higher price).
Generalizes R1's price-only competition: each firm's "appeal" is a weighted
sum of price-value, quality, and brand; the market splits by appeal
(largest-remainder, conserved).
MODEL:
appeal = max(0, w_price*max(0,choke-price) + w_qual*quality + w_brand*brand)
share = market_m * appeal / sum(appeal) (largest-remainder)
nx_safety_envelope:
intended_use: capitalism-lab demand model (pure functions, no I/O)
sil_target: SIL1
verdict: NOT_YET_EVALUATED
genealogy_id: capitalism_lab_quality_brand_canon
lineage_id: nx_caplab_quality_v1
dependencies 2 imports · 4 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_caplab_cities.nxnx_caplab_products.nxnx_caplab_quality_test.nxnx_econsim_page.nx
structs
| none |
consts
| none |
functions
| 25 | func nx_clab_apportion(n: nx_int, weights: *i64, total: nx_int, out_q: *i64) |
| 64 | func nx_clab_appeal_qb(choke: nx_int, price: nx_int, quality: nx_int, brand: nx_int, |
| 74 | func nx_clab_split_qb(n: nx_int, prices: *i64, qualities: *i64, brands: *i64, |