GreaterEqual model

Requirements.Examples.Elementary.ChecksInFixedWindow.GreaterEqual  ยท source

Icon of GreaterEqual

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, greAct1 and greAct2 require 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.
  • greAct3 requires 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

NameTypeDescription
sinModelica.Blocks.Sources.Sinesin(2 pi t / 1 s)
conModelica.Blocks.Sources.ConstantOutputs zero
onRequirements.Sources.BooleanConstantAlways active
offRequirements.Sources.BooleanConstantNever active
booPulModelica.Blocks.Sources.BooleanPulseActive in the first half of every 0.25 s
greActRequirements.ChecksInFixedWindow.GreaterEqualsin >= 0, always active: violated
greAct1Requirements.ChecksInFixedWindow.GreaterEqualsin >= 0, never active: Undefined, untested
greAct2Requirements.ChecksInFixedWindow.GreaterEqualsin >= 0, sometimes active: violated
greAct3Requirements.ChecksInFixedWindow.GreaterEqual0 >= 0, sometimes active: satisfied, margin 0
reqGreActRequirements.Verify.RequirementRequirement on greAct, with statistics and margin
reqGreAct1Requirements.Verify.RequirementRequirement on greAct1, with statistics and margin
reqGreAct2Requirements.Verify.RequirementRequirement on greAct2, with statistics and margin
reqGreAct3Requirements.Verify.RequirementRequirement on greAct3, with statistics and margin
printViolations innerRequirements.Verify.PrintViolationsPrints the requirement summary at 1 s