Skip to content

Commit b67aff0

Browse files
committed
Added cache into capacity envelope analysis to avoid redundant maxflow calculations.
1 parent 8b679da commit b67aff0

3 files changed

Lines changed: 357 additions & 327 deletions

File tree

docs/reference/api-full.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For a curated, example-driven API guide, see **[api.md](api.md)**.
1010
> - **[CLI Reference](cli.md)** - Command-line interface
1111
> - **[DSL Reference](dsl.md)** - YAML syntax guide
1212
13-
**Generated from source code on:** July 05, 2025 at 20:14 UTC
13+
**Generated from source code on:** July 05, 2025 at 23:05 UTC
1414

1515
**Modules auto-discovered:** 51
1616

@@ -2193,6 +2193,12 @@ Performs Monte-Carlo analysis by repeatedly applying failures and measuring capa
21932193
to build statistical envelopes of network resilience. Results include both individual
21942194
flow capacity envelopes and total capacity samples per iteration.
21952195

2196+
This implementation uses parallel processing for efficiency:
2197+
- Network is serialized once and shared across all worker processes
2198+
- Failure exclusions are pre-computed in the main process
2199+
- NetworkView provides lightweight exclusion without deep copying
2200+
- Flow computations are cached within workers to avoid redundant calculations
2201+
21962202
YAML Configuration:
21972203
```yaml
21982204
workflow:
@@ -2201,7 +2207,7 @@ YAML Configuration:
22012207
source_path: "^datacenter/.*" # Regex pattern for source node groups
22022208
sink_path: "^edge/.*" # Regex pattern for sink node groups
22032209
mode: "combine" # "combine" or "pairwise" flow analysis
2204-
failure_policy: "random_failures" # Optional: Named failure policy to use
2210+
failure_policy: "random_failures" # Optional: Named failure policy to use
22052211
iterations: 1000 # Number of Monte-Carlo trials
22062212
parallelism: 4 # Number of parallel worker processes
22072213
shortest_path: false # Use shortest paths only

0 commit comments

Comments
 (0)