PartialRequirement partial block

Requirements.Interfaces.PartialRequirement  ยท source

Icon of PartialRequirement

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

DateDescription
Sept. 14, 2026The 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, 2026Four-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, 2026Optional 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, 2026Initial 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

NameTypeDescription
text parameterStringRequirement stated in natural language
computeStatistics parameterBoolean= true, if violation statistics are computed (Verify.ViolationStatistics) and logged beside the verdict
useMargin parameterBoolean= true, if the margin input is enabled: the worst margin is computed and logged as well
minDuration parameterSI.TimeViolation episodes shorter than this are not counted (0: every one is)
mergeGap parameterSI.TimeA violation that starts within this time after the previous one ended continues that episode
method parameterRequirements.Types.WorstMarginMethodHow the worst margin is found
T parameterSI.TimeContinuous: time constant of the derivative filter, about a thousandth of the margin's time scale (60 s for a year)
resolution parameterRealRatchet: resolution of the worst margin, in margin units (tolerances)

Inputs

NameTypeDescription
localProperty inputRequirements.Types.PropertyProperty that is required to be satisfied

Components and variables

NameTypeDescription
marginRequirements.Interfaces.MarginInputMargin of the property (connect the check block's margin output)
statisticsRequirements.Verify.ViolationStatisticsViolation statistics of the property (computeStatistics = true)