|
| 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