Skip to content

Commit 0fea6de

Browse files
authored
Merge pull request #504 from AdaWorldAPI/claude/jirak-math-theorems-harvest-rfii13
perturbation-sim: eigenvalue-perturbation + edge-propagation outage simulator
2 parents 9bfc58f + 8e656fc commit 0fea6de

30 files changed

Lines changed: 6377 additions & 0 deletions

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ exclude = [
3939
"crates/learning",
4040
"crates/jc",
4141
"crates/sigker",
42+
# Outage perturbation-shape simulator — standalone zero-dep research crate.
43+
# The applied companion to jc: supplies the genuine eigenvalue-perturbation
44+
# result (Weyl/Davis-Kahan on the weighted Laplacian) that jc::weyl
45+
# (equidistribution) is NOT, composed with a DC-power-flow/LODF cascade.
46+
# Verify via `cargo test --manifest-path crates/perturbation-sim/Cargo.toml`.
47+
"crates/perturbation-sim",
4248
# Place/Residue golden-spiral codec — standalone, with a MANDATORY git dep on
4349
# the AdaWorldAPI ndarray fork (the SIMD foundation). Verified via
4450
# `cargo test --manifest-path crates/helix/Cargo.toml`.

crates/perturbation-sim/Cargo.lock

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/perturbation-sim/Cargo.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[package]
2+
name = "perturbation-sim"
3+
version = "0.1.0"
4+
edition = "2021"
5+
license = "Apache-2.0"
6+
description = "Spectral + edge-propagation outage simulator: models the perturbation SHAPE of a cascading grid failure. Weyl/Davis-Kahan eigenvalue-perturbation of the weighted graph Laplacian (a line trip = low-rank perturbation E) composed with a DC-power-flow / LODF cascade. Standalone, zero-dep, deterministic — the applied companion to lance-graph crates/jc (jc::weyl = equidistribution; this crate is the missing eigenvalue-perturbation pillar) and jc::ewa_sandwich (edge propagation)."
7+
8+
# Standalone research crate (excluded from the lance-graph workspace, like jc /
9+
# sigker / helix). Verify with:
10+
# cargo test --manifest-path crates/perturbation-sim/Cargo.toml
11+
# cargo run --manifest-path crates/perturbation-sim/Cargo.toml --example simulate
12+
[features]
13+
# Route the Morton/Walsh pyramid transform through ndarray's SIMD
14+
# (AVX-512 under x86-64-v4) Walsh–Hadamard. AMX is int8/bf16 tile-GEMM and is
15+
# NOT used (this crate's WHT is f32, its field tier f64). Default OFF → stays
16+
# zero-dep with the scalar `fwht` fallback. Build accelerated with:
17+
# RUSTFLAGS='-C target-cpu=x86-64-v4' cargo … --features ndarray-simd
18+
# (or target-cpu=native locally). All SIMD comes from `ndarray::simd` per the
19+
# workspace rule — never raw intrinsics here.
20+
ndarray-simd = ["dep:ndarray"]
21+
22+
[dependencies]
23+
# The AdaWorldAPI fork ("The Foundation"), optional + behind `ndarray-simd`.
24+
# Sourced by GIT (not a local path): an optional *path* dep is read at manifest
25+
# resolution, so a clean checkout without the sibling `../../../ndarray` fails
26+
# even with the feature OFF — breaking the zero-dep default (codex P2 on #504,
27+
# the helix-#460 lesson). A git source resolves remotely and is only fetched/
28+
# built when `ndarray-simd` activates it. Local-dev alternative: swap to
29+
# ndarray = { path = "../../../ndarray", optional = true, default-features = false, features = ["std"] }
30+
ndarray = { git = "https://github.com/AdaWorldAPI/ndarray.git", branch = "master", optional = true, default-features = false, features = ["std"] }
31+
32+
[lib]
33+
name = "perturbation_sim"
34+
path = "src/lib.rs"
35+
36+
[[example]]
37+
name = "simulate"
38+
path = "examples/simulate.rs"
39+
40+
[[example]]
41+
name = "iberian"
42+
path = "examples/iberian.rs"
43+
44+
[[example]]
45+
name = "validate"
46+
path = "examples/validate.rs"
47+
48+
[[example]]
49+
name = "weakest_links"
50+
path = "examples/weakest_links.rs"
51+
52+
[[example]]
53+
name = "hhtl_levels"
54+
path = "examples/hhtl_levels.rs"
55+
56+
[[example]]
57+
name = "reinforce"
58+
path = "examples/reinforce.rs"
59+
60+
[[example]]
61+
name = "hhtl_resident"
62+
path = "examples/hhtl_resident.rs"

0 commit comments

Comments
 (0)