You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario-driven network modeling and analysis framework combining Python's flexibility with high-performance C++ algorithms.
5
+
Scenario-driven network modeling and analysis framework combining Pythonwith C++ graph algorithms.
6
6
7
7
## Overview
8
8
9
-
NetGraph enables declarative modeling of network topologies, traffic matrices, and failure scenarios. It delegates computationally intensive graph algorithms to [NetGraph-Core](https://github.com/networmix/NetGraph-Core) while providing a rich Python API and CLI for orchestration.
9
+
NetGraph enables declarative modeling of network topologies, traffic matrices, and failure scenarios. It delegates computationally intensive graph algorithms to [NetGraph-Core](https://github.com/networmix/NetGraph-Core) while providing a Python API and CLI for orchestration.
10
10
11
11
## Architecture
12
12
13
13
NetGraph employs a **hybrid Python+C++ architecture**:
14
14
15
15
-**Python layer (NetGraph)**: Scenario DSL parsing, workflow orchestration, result aggregation, and high-level APIs.
16
-
-**C++ layer (NetGraph-Core)**: Performance-critical graph algorithms (SPF, KSP, Max-Flow) executing in optimized C++ with the GIL released.
16
+
-**C++ layer (NetGraph-Core)**: Graph algorithms (SPF, KSP, Max-Flow) executing in C++ with the GIL released.
17
17
18
18
## Key Features
19
19
20
20
### 1. Modeling & DSL
21
21
22
22
-**Declarative Scenarios**: Define topology, traffic, and workflows in validated YAML.
NetGraph scenarios define topology, configuration, and analysis steps in a unified YAML file. This example demonstrates **blueprints** for modular topology definition:
98
+
NetGraph scenarios define topology, configuration, and analysis steps in a unified YAML file. This example demonstrates **blueprints** for modular topology definition and a **flow analysis workflow** with Monte Carlo failure simulation:
99
99
100
100
```yaml
101
101
seed: 42
@@ -130,6 +130,16 @@ network:
130
130
capacity: 50
131
131
cost: 10
132
132
133
+
# Define failure policy for Monte Carlo analysis
134
+
failures:
135
+
random_link:
136
+
modes:
137
+
- weight: 1.0
138
+
rules:
139
+
- scope: link
140
+
mode: choice
141
+
count: 1
142
+
133
143
# Define traffic demands
134
144
demands:
135
145
global_traffic:
@@ -139,7 +149,7 @@ demands:
139
149
mode: combine
140
150
flow_policy: SHORTEST_PATHS_ECMP
141
151
142
-
#Define analysis workflow
152
+
#Analysis workflow: find max supported demand, then test under failures
143
153
workflow:
144
154
- type: NetworkStats
145
155
name: stats
@@ -148,12 +158,19 @@ workflow:
148
158
source: ^site1/leaf/
149
159
target: ^site2/leaf/
150
160
mode: combine
151
-
shortest_path: false
152
161
- type: MaximumSupportedDemand
153
162
name: max_demand
154
163
demand_set: global_traffic
164
+
- type: TrafficMatrixPlacement
165
+
name: placement_at_max
166
+
demand_set: global_traffic
167
+
alpha_from_step: max_demand # Use alpha_star from MSD step
168
+
failure_policy: random_link
169
+
iterations: 100
155
170
```
156
171
172
+
The workflow demonstrates **step chaining**: `MaximumSupportedDemand` finds the maximum feasible demand multiplier (`alpha_star=1.0`), then `TrafficMatrixPlacement` uses that value via `alpha_from_step` to run Monte Carlo placement under random link failures. Results show baseline placement at 100% and worst-case failure at 50% (when a spine-to-spine link fails).
0 commit comments