Verify package
Requirements.Verify
ยท source
Library of components to verify requirements
Extends Modelica.Icons.Package
Sublibrary Verify contains components to evaluate whether requirements are satisfied, violated, or not tested and to print the result of this assessment after the simulation run to the output window.
- Requirement takes the verdict on a Property signal (the output of a check block), BooleanRequirement on a Boolean signal that shall be true. Each instance writes one line with its verdict (violated, untested or satisfied) and the number of attempts to the log file.
- PrintViolations must be present once, as
inner printViolations, in the top level of the model: it names the log file, collects the lines of all requirements, prints the summary to the output window and writes it as an HTML report, and outputs the percentage of satisfied requirements. - ViolationStatistics counts how often,
how long and how badly a property was violated over a run; the requirement blocks contain it when
computeStatistics = true.
The verdict is taken when terminal() becomes true, or at evaluationTime of
PrintViolations for tools without terminal(). Examples are in
Examples.Elementary.Verify and
Examples.Elementary.ViolationStatistics.
Contents
| Name | Kind | Description | |
|---|---|---|---|
| PrintViolations | model | Print violated, untested and satisfied requirements at end of simulation (drag in top level of your model) | |
| Requirement | block | Check requirement defined by Property input property (property shall be Property.Satisfied) | |
| BooleanRequirement | block | Check requirement defined by Boolean input u (u shall be true for a satisfied requirement) | |
| ViolationStatistics | block | Violation statistics of a property over a run: how often it was violated, for how long in total, the longest violation, the worst margin and when |