-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The current implementation of NetGraph allows risk_groups to be assigned to Nodes and Links without validating that those groups are explicitly defined in the risk_groups section of the scenario.
While the Network model permissively accepts string tags for risk groups, the FailureManager and Network methods (like disable_risk_group) strictly require the group to be present in the risk_groups registry to function.
This leads to a "silent failure" state:
- A user assigns a risk group (e.g., risk_groups: ["Rack_A"]) to a node.
- The user forgets to define Rack_A in the top-level risk_groups section.
- The user defines a failure policy targeting Rack_A.
Result: The simulation runs successfully but no failures occur, because the failure engine ignores undefined groups. No warning or error is raised to alert the user that their configuration is incomplete.
Maybe we should raise a ValueError during Network construction if a node/link references a risk group that does not exist.