PartialRequirement partial block
Requirements.Interfaces.PartialRequirement
ยท source
Common properties of all requirement blocks
This block is used to verify a requirement. The input signal "property" can have the four values Violated, Undecided, Satisfied or Undefined (Property). The goal is that "property" is always Satisfied. A requirement is violated, if property = Violated at any instant. It is untested, if property was Undecided (applicable, but not decided) or Undefined (not applicable) all the time: the four values collapse to the three verdicts violated / untested / satisfied here, and the log records beside the verdict the number of attempts, the phases in which the property was applicable (not Undefined); an untested requirement with 0 attempts was never applicable. A Boolean signal can be casted to the three-valued logic required by "property" by cast blocks, such as BooleanToProperty, During, or WhenRising
In the top level of a model, block PrintViolations has to be dragged. This block prints an information message at the end of a simulation, whether a Requirement has been violated or untested in the current simulation run. Furthermore, all Requirement instances store information about the Requirement in a log file (the default name is "<root-name>_log.txt"; this name can be changed via parameter logFile in the instance of PrintViolations. Exactly one line is printed in the log file for every used Requirement block that is either violated or untested:
If the Requirement instance is violated at least once:
Requirement violated: <full path name> (at time = <first failure time> s, <n> attempts)
If the Requirement instance is not tested:
Requirement untested: <full path name> (<n> attempts)
For an example to use the Requirement block in graphical form, see
Examples.Elementary.Verify.Requirement.
For an example to use the Requirement block in textual form, see
Examples.Textual.Elementary.Verify.Requirement.
Revisions
| Date | Description |
|---|---|
| Sept. 14, 2026 | The instant the verdict is taken at comes from the inner printViolations: terminal(), or evaluationTime when its useEvaluationTime is set (H. Tummescheit, Model Based Innovation LLC) |
| Sept. 15, 2026 | Four-valued Property: Undefined (not applicable) counts as untested like Undecided; attempts, the number of phases in which the property was applicable, is logged beside the verdict (H. Tummescheit, Model Based Innovation LLC) |
| Oct. 19, 2026 | Optional violation statistics (computeStatistics, tab Statistics): a
ViolationStatistics on the property, with the
conditional margin input when useMargin is set, logged as a Statistics line beside the
verdict and printed in the summary (H. Tummescheit, Model Based Innovation LLC) |
| Dec. 3, 2026 | Initial values of atLeastOneFailure, untested and status set by one
equation each instead of an if-equation (same values; OpenModelica could not bring the if-equation into residual form).
Diagram position of the margin input moved inside the diagram, icon position unchanged (Model Based Innovation LLC) |
Parameters
| Name | Type | Description |
|---|---|---|
text parameter | String | Requirement stated in natural language |
computeStatistics parameter | Boolean | = true, if violation statistics are computed (Verify.ViolationStatistics) and logged beside the verdict |
useMargin parameter | Boolean | = true, if the margin input is enabled: the worst margin is computed and logged as well |
minDuration parameter | SI.Time | Violation episodes shorter than this are not counted (0: every one is) |
mergeGap parameter | SI.Time | A violation that starts within this time after the previous one ended continues that episode |
method parameter | Requirements.Types.WorstMarginMethod | How the worst margin is found |
T parameter | SI.Time | Continuous: time constant of the derivative filter, about a thousandth of the margin's time scale (60 s for a year) |
resolution parameter | Real | Ratchet: resolution of the worst margin, in margin units (tolerances) |
Inputs
| Name | Type | Description |
|---|---|---|
localProperty input | Requirements.Types.Property | Property that is required to be satisfied |
Components and variables
| Name | Type | Description |
|---|---|---|
margin | Requirements.Interfaces.MarginInput | Margin of the property (connect the check block's margin output) |
statistics | Requirements.Verify.ViolationStatistics | Violation statistics of the property (computeStatistics = true) |