WorstMarginMethod type

Requirements.Types.WorstMarginMethod  ยท source

How Verify.ViolationStatistics finds the worst margin

Defined as enumeration

The two ways ViolationStatistics tracks the least margin of a run.

  • Continuous (the default) detects every local extremum of the margin with the derivative filter of Modelica.Blocks.Math.ContinuousSignalExtrema, which it extends. The worst margin is exact up to the filter's lag (about T, to be chosen from the margin's time scale); the cost is one state event per local extremum of the margin, minima and maxima.
  • Ratchet fires a state event only when the margin falls more than resolution below the least value found so far. The worst margin is within resolution of the exact value; the number of events is bounded by the depth of the descent divided by resolution, however much the margin oscillates. Use it for a margin with many small local extrema (a temperature under an oscillating controller).