feat(simulation): add economics simulation binary with Layer 1+2 (#806, #807)

Adds tooling/econ-sim — a standalone Rust binary for the Phase 2 economics
simulation:

Layer 1 (Leontief production, #806):
- Deterministic per-run PRNG seeding of corp×site productivity (D-176)
- Fixed-coefficient production chains; scarcity cascades downstream (D-178)
- Per-capita population demand for finals and services
- Gate-energy demand reduction for fusion_fuel at connected nodes (D-186)
- Price adjustment via local tâtonnement

Layer 2 (spatial price equilibrium, #807):
- Damped tâtonnement trade flows along gate links (α=0.03, β=0.4, D-178)
- 8% transport cost per hop damps long-distance arbitrage
- Flows computed from pre-step snapshot; applied atomically
- --stability-check implements D-179 Tests 1 and 2:
  · Test 1: cold-start convergence ±5% at tick 100 → PASS (max 1.05%)
  · Test 2: long-run stability ±2% over ticks 900–999 → PASS (max 0.00%)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 13:56:06 +02:00
co-authored by Claude Sonnet 4.6
parent 7b0465a8c6
commit fb87f933f5
1169 changed files with 11201 additions and 0 deletions
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/ahash-755917093ed46ecf/build_script_build-755917093ed46ecf.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ahash-0.8.12/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/ahash-755917093ed46ecf/build_script_build-755917093ed46ecf: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ahash-0.8.12/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ahash-0.8.12/build.rs:
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,4 @@
cargo:rerun-if-changed=build.rs
cargo:rustc-check-cfg=cfg(specialize)
cargo:rustc-check-cfg=cfg(folded_multiply)
cargo:rustc-cfg=folded_multiply
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/ahash-e358e959a01420b1/out
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/getrandom-4e558f3972741801/build_script_build-4e558f3972741801.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/getrandom-4e558f3972741801/build_script_build-4e558f3972741801: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/build.rs:
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1 @@
cargo:rerun-if-changed=build.rs
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/getrandom-ac7327588d94e65c/out
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,25 @@
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_FREEBSD_VERSION
cargo:rustc-cfg=freebsd12
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_MUSL_V1_2_3
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_TIME_BITS
cargo:rustc-check-cfg=cfg(emscripten_old_stat_abi)
cargo:rustc-check-cfg=cfg(espidf_time32)
cargo:rustc-check-cfg=cfg(freebsd10)
cargo:rustc-check-cfg=cfg(freebsd11)
cargo:rustc-check-cfg=cfg(freebsd12)
cargo:rustc-check-cfg=cfg(freebsd13)
cargo:rustc-check-cfg=cfg(freebsd14)
cargo:rustc-check-cfg=cfg(freebsd15)
cargo:rustc-check-cfg=cfg(gnu_file_offset_bits64)
cargo:rustc-check-cfg=cfg(gnu_time_bits64)
cargo:rustc-check-cfg=cfg(libc_deny_warnings)
cargo:rustc-check-cfg=cfg(linux_time_bits64)
cargo:rustc-check-cfg=cfg(musl_v1_2_3)
cargo:rustc-check-cfg=cfg(musl32_time64)
cargo:rustc-check-cfg=cfg(vxworks_lt_25_09)
cargo:rustc-check-cfg=cfg(target_os,values("switch","aix","ohos","hurd","rtems","visionos","nuttx","cygwin","qurt"))
cargo:rustc-check-cfg=cfg(target_env,values("illumos","wasi","aix","ohos","nto71_iosock","nto80"))
cargo:rustc-check-cfg=cfg(target_arch,values("loongarch64","mips32r6","mips64r6","csky"))
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libc-79634aea11cf640b/out
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libc-e1bd0310014ded43/build_script_build-e1bd0310014ded43.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.184/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libc-e1bd0310014ded43/build_script_build-e1bd0310014ded43: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.184/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.184/build.rs:
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,64 @@
cargo:rerun-if-env-changed=LIBSQLITE3_SYS_USE_PKG_CONFIG
cargo:include=/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1/sqlite3
cargo:rerun-if-changed=sqlite3/sqlite3.c
cargo:rerun-if-changed=sqlite3/wasm32-wasi-vfs.c
cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER
cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH
cargo:rerun-if-env-changed=SQLITE_MAX_COLUMN
cargo:rerun-if-env-changed=LIBSQLITE3_FLAGS
cargo:rerun-if-env-changed=CC_FORCE_DISABLE
CC_FORCE_DISABLE = None
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
AR_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
AR_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
ARFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
ARFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
AR_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
AR_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
ARFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
ARFLAGS_x86_64-unknown-linux-gnu = None
cargo:rustc-link-lib=static=sqlite3
cargo:rustc-link-search=native=/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libsqlite3-sys-027cdfcd1b5b0ef2/out
cargo:lib_dir=/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libsqlite3-sys-027cdfcd1b5b0ef2/out
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libsqlite3-sys-027cdfcd1b5b0ef2/out
@@ -0,0 +1,7 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libsqlite3-sys-357537b7d5fb2183/build_script_build-357537b7d5fb2183.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/libsqlite3-sys-357537b7d5fb2183/build_script_build-357537b7d5fb2183: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1/build.rs:
# env-dep:CARGO_MANIFEST_DIR=/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libsqlite3-sys-0.30.1
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,23 @@
cargo:rustc-check-cfg=cfg(fuzzing)
cargo:rustc-check-cfg=cfg(no_is_available)
cargo:rustc-check-cfg=cfg(no_literal_byte_character)
cargo:rustc-check-cfg=cfg(no_literal_c_string)
cargo:rustc-check-cfg=cfg(no_source_text)
cargo:rustc-check-cfg=cfg(proc_macro_span)
cargo:rustc-check-cfg=cfg(proc_macro_span_file)
cargo:rustc-check-cfg=cfg(proc_macro_span_location)
cargo:rustc-check-cfg=cfg(procmacro2_backtrace)
cargo:rustc-check-cfg=cfg(procmacro2_build_probe)
cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)
cargo:rustc-check-cfg=cfg(procmacro2_semver_exempt)
cargo:rustc-check-cfg=cfg(randomize_layout)
cargo:rustc-check-cfg=cfg(span_locations)
cargo:rustc-check-cfg=cfg(super_unstable)
cargo:rustc-check-cfg=cfg(wrap_proc_macro)
cargo:rerun-if-changed=src/probe/proc_macro_span.rs
cargo:rustc-cfg=wrap_proc_macro
cargo:rerun-if-changed=src/probe/proc_macro_span_location.rs
cargo:rustc-cfg=proc_macro_span_location
cargo:rerun-if-changed=src/probe/proc_macro_span_file.rs
cargo:rustc-cfg=proc_macro_span_file
cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/proc-macro2-82c8367507a6ace1/out
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/proc-macro2-8e985430bcbaa7b0/build_script_build-8e985430bcbaa7b0.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/proc-macro2-8e985430bcbaa7b0/build_script_build-8e985430bcbaa7b0: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/build.rs:
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/quote-6f2342aa854874a4/build_script_build-6f2342aa854874a4.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/quote-6f2342aa854874a4/build_script_build-6f2342aa854874a4: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/build.rs:
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,2 @@
cargo:rerun-if-changed=build.rs
cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/quote-7c4bc4c8d8113ff9/out
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,6 @@
#[doc(hidden)]
pub mod __private228 {
#[doc(hidden)]
pub use crate::private::*;
}
use serde_core::__private228 as serde_core_private;
@@ -0,0 +1,13 @@
cargo:rerun-if-changed=build.rs
cargo:rustc-cfg=if_docsrs_then_no_serde_core
cargo:rustc-check-cfg=cfg(feature, values("result"))
cargo:rustc-check-cfg=cfg(if_docsrs_then_no_serde_core)
cargo:rustc-check-cfg=cfg(no_core_cstr)
cargo:rustc-check-cfg=cfg(no_core_error)
cargo:rustc-check-cfg=cfg(no_core_net)
cargo:rustc-check-cfg=cfg(no_core_num_saturating)
cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)
cargo:rustc-check-cfg=cfg(no_serde_derive)
cargo:rustc-check-cfg=cfg(no_std_atomic)
cargo:rustc-check-cfg=cfg(no_std_atomic64)
cargo:rustc-check-cfg=cfg(no_target_has_atomic)
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde-30dfd4c93d7ae6f7/out
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde-f2949ac091c3d152/build_script_build-f2949ac091c3d152.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde-f2949ac091c3d152/build_script_build-f2949ac091c3d152: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/build.rs:
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde_core-0f37286f728ffabd/build_script_build-0f37286f728ffabd.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde_core-0f37286f728ffabd/build_script_build-0f37286f728ffabd: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/build.rs:
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,5 @@
#[doc(hidden)]
pub mod __private228 {
#[doc(hidden)]
pub use crate::private::*;
}
@@ -0,0 +1,11 @@
cargo:rerun-if-changed=build.rs
cargo:rustc-check-cfg=cfg(if_docsrs_then_no_serde_core)
cargo:rustc-check-cfg=cfg(no_core_cstr)
cargo:rustc-check-cfg=cfg(no_core_error)
cargo:rustc-check-cfg=cfg(no_core_net)
cargo:rustc-check-cfg=cfg(no_core_num_saturating)
cargo:rustc-check-cfg=cfg(no_diagnostic_namespace)
cargo:rustc-check-cfg=cfg(no_serde_derive)
cargo:rustc-check-cfg=cfg(no_std_atomic)
cargo:rustc-check-cfg=cfg(no_std_atomic64)
cargo:rustc-check-cfg=cfg(no_target_has_atomic)
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/serde_core-51581c1704d17ce7/out
@@ -0,0 +1 @@
This file has an mtime of when this was started.
@@ -0,0 +1,24 @@
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=Cargo.toml
cargo:rustc-check-cfg=cfg(no_zerocopy_simd_x86_avx12_1_89_0)
cargo:rustc-check-cfg=cfg(rust, values("1.89.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_core_error_1_81_0)
cargo:rustc-check-cfg=cfg(rust, values("1.81.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_diagnostic_on_unimplemented_1_78_0)
cargo:rustc-check-cfg=cfg(rust, values("1.78.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_generic_bounds_in_const_fn_1_61_0)
cargo:rustc-check-cfg=cfg(rust, values("1.61.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_target_has_atomics_1_60_0)
cargo:rustc-check-cfg=cfg(rust, values("1.60.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_aarch64_simd_1_59_0)
cargo:rustc-check-cfg=cfg(rust, values("1.59.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_aarch64_simd_be_1_87_0)
cargo:rustc-check-cfg=cfg(rust, values("1.87.0"))
cargo:rustc-check-cfg=cfg(no_zerocopy_panic_in_const_and_vec_try_reserve_1_57_0)
cargo:rustc-check-cfg=cfg(rust, values("1.57.0"))
cargo:rustc-check-cfg=cfg(doc_cfg)
cargo:rustc-check-cfg=cfg(kani)
cargo:rustc-check-cfg=cfg(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS)
cargo:rustc-check-cfg=cfg(__ZEROCOPY_INTERNAL_USE_ONLY_DEV_MODE)
cargo:rustc-check-cfg=cfg(coverage_nightly)
cargo:rustc-check-cfg=cfg(zerocopy_inline_always)
@@ -0,0 +1 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/zerocopy-3e4c106aef611585/out
@@ -0,0 +1,5 @@
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/zerocopy-bbad1e0682c1bd67/build_script_build-bbad1e0682c1bd67.d: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zerocopy-0.8.48/build.rs
/var/mnt/data/projects/settled-reach/.sprint/sprint-33/server/tooling/econ-sim/target/debug/build/zerocopy-bbad1e0682c1bd67/build_script_build-bbad1e0682c1bd67: /home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zerocopy-0.8.48/build.rs
/home/jeroenschweitzer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zerocopy-0.8.48/build.rs: