GreaterEqual model
Requirements.Examples.Elementary.ChecksInFixedWindow.GreaterEqual
ยท source
Example for GreaterEqual (a sine and a constant compared, always, never and sometimes active)
Extends Modelica.Icons.Example
Check block GreaterEqual, each check feeding a Verify.Requirement with violation statistics and margin:
greAct,greAct1andgreAct2require sin(2πt) ≥ 0 with the condition always true, always false and true in the first half of every 0.25 s: violated, Undefined throughout (untested), and violated in the active window [0.5, 0.625) s where the sine is negative.greAct3requires 0 ≥ 0 in the same windows: satisfied, with margin 0.
This is the validation model Buildings_Requirements.Validation.GreaterEqual of
modelica-buildings-requirements
(M. Wetter, LBNL), ported with the block in version 0.13.0. The verdicts are the original's, except that an
inactive check is Undefined (4) where the original reported Undecided (2).
Copyright (c) 1998-2024 The Regents of the University of California, through Lawrence Berkeley National Laboratory,
and contributors; see UsersGuide.BuildingsLicense.
Copyright © 2026 Model Based Innovation LLC (the port). All rights reserved.
Components and variables
| Name | Type | Description |
|---|---|---|
sin | Modelica.Blocks.Sources.Sine | sin(2 pi t / 1 s) |
con | Modelica.Blocks.Sources.Constant | Outputs zero |
on | Requirements.Sources.BooleanConstant | Always active |
off | Requirements.Sources.BooleanConstant | Never active |
booPul | Modelica.Blocks.Sources.BooleanPulse | Active in the first half of every 0.25 s |
greAct | Requirements.ChecksInFixedWindow.GreaterEqual | sin >= 0, always active: violated |
greAct1 | Requirements.ChecksInFixedWindow.GreaterEqual | sin >= 0, never active: Undefined, untested |
greAct2 | Requirements.ChecksInFixedWindow.GreaterEqual | sin >= 0, sometimes active: violated |
greAct3 | Requirements.ChecksInFixedWindow.GreaterEqual | 0 >= 0, sometimes active: satisfied, margin 0 |
reqGreAct | Requirements.Verify.Requirement | Requirement on greAct, with statistics and margin |
reqGreAct1 | Requirements.Verify.Requirement | Requirement on greAct1, with statistics and margin |
reqGreAct2 | Requirements.Verify.Requirement | Requirement on greAct2, with statistics and margin |
reqGreAct3 | Requirements.Verify.Requirement | Requirement on greAct3, with statistics and margin |
printViolations inner | Requirements.Verify.PrintViolations | Prints the requirement summary at 1 s |