StatisticsLogger block

Requirements.Internal.StatisticsLogger  ยท source

Icon of StatisticsLogger

Writes the violation statistics of one requirement to the log file of the inner printViolations (used by Verify.ViolationStatistics)

Extends Modelica.Blocks.Icons.Block

Writes one Statistics line per requirement to the log file of the inner PrintViolations, at the same instant the verdicts are written, and orders the write before the summary through the sorting port (it adds 0 to the requirement count).

The instant is terminal(), or evaluationTime when useEvaluationTime is set in PrintViolations. The line is written by printStatisticsToLogFile with the name of the outer ObservationID as the checked component, requirementName, the statistics inputs, and minDuration and mergeGap, so that a reader of the log can recompute the statistics; worst and tWorst are logged only if hasMargin. The block is instantiated by Verify.ViolationStatistics when logStatistics = true (which the requirement blocks set when computeStatistics = true); all its inputs and parameters are bound there.

Parameters

NameTypeDescription
requirementName parameterStringFull path name of the requirement the statistics belong to
hasMargin parameterBoolean= true, if worst and tWorst are logged
minDuration parameterSI.TimeThe statistics' minDuration, logged with them
mergeGap parameterSI.TimeThe statistics' mergeGap, logged with them

Inputs

NameTypeDescription
nViolations inputIntegerNumber of violation episodes
totalDuration inputSI.TimeTime violated, in total
violatedFraction inputRealFraction of the applicable time violated
longestDuration inputSI.TimeDuration of the longest violation episode
tLongestStart inputSI.TimeStart of the longest violation episode
worst inputRealWorst margin (logged if hasMargin)
tWorst inputSI.TimeInstant of the worst margin (logged if hasMargin)