Gravity migration bug: distance must gate the TOTAL flow, not just the split
A gravity migration model weighted each destination by room/(1+tau*distance) and distributed a fixed emigration total by those weights. Bug: with a SINGLE destination the weight normalizes to 1, so distance/transport-cost had ZERO effect on how many migrated — only which destination they picked. Symptom: cheap vs expensive roads gave identical concentration. Fix: make emigration TOTAL scale with the accessibility of the best destination (leaving *= exp(-dist/range)); distance then genuinely gates flow, not just allocation. General rule: if a cost is meant to gate a quantity, it must enter the magnitude, not only the softmax/normalized split. Second lesson (discipline): when an emergent phase-transition only partially manifests, ship the channel that genuinely works (here labour-mobility concentration) with honest modest asserts and DOCUMENT the concrete blockers for the sharp version (a demand-only market reading price=None so nothing steers imports; a glut price-gap making the transport risk-premium non-binding; own-growth masking the imported contribution) rather than over-fitting parameters to force a dramatic green result.