stormvogel.model.validation¶
Validity checking for stormvogel models.
Classes¶
Create a collection of name/value pairs. |
|
Functions¶
|
|
|
|
|
Check that every distribution sums to 1 (skipped for parametric/interval models). |
|
|
|
|
|
|
|
Run checks that apply to all model types. |
|
Run MDP-specific checks (deadlocks and reachability). |
|
Validate a model and return a |
Module Contents¶
- class stormvogel.model.validation.Severity(*args, **kwds)¶
Bases:
enum.EnumCreate a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- ERROR = 'ERROR'¶
- WARNING = 'WARNING'¶
- class stormvogel.model.validation.ValidationIssue¶
-
- message: str¶
- context: Any = None¶
- __str__() str¶
- class stormvogel.model.validation.ValidationResult(issues: list[ValidationIssue])¶
- issues¶
- property is_valid: bool¶
- property errors: list[ValidationIssue]¶
- property warnings: list[ValidationIssue]¶
- __str__() str¶
- __repr__() str¶
- stormvogel.model.validation._check_initial_state(model: stormvogel.model.model.Model) list[ValidationIssue]¶
- stormvogel.model.validation._check_transition_targets(model: stormvogel.model.model.Model) list[ValidationIssue]¶
- stormvogel.model.validation._check_distributions(model: stormvogel.model.model.Model) list[ValidationIssue]¶
Check that every distribution sums to 1 (skipped for parametric/interval models).
- stormvogel.model.validation._check_zero_transitions(model: stormvogel.model.model.Model) list[ValidationIssue]¶
- stormvogel.model.validation._check_deadlocks(model: stormvogel.model.model.Model) list[ValidationIssue]¶
- stormvogel.model.validation._check_reachability(model: stormvogel.model.model.Model) list[ValidationIssue]¶
Run checks that apply to all model types.
- stormvogel.model.validation.validate_mdp(model: stormvogel.model.model.Model) list[ValidationIssue]¶
Run MDP-specific checks (deadlocks and reachability).
- stormvogel.model.validation.validate(model: stormvogel.model.model.Model) ValidationResult¶
Validate a model and return a
ValidationResult.Shared checks (target states, stochasticity, initial state, zero transitions) are run for every model type. MDP-specific checks (deadlocks, reachability) are added for MDP models.