Requirement model
Requirements.Examples.Elementary.Verify.Requirement
ยท source
Example for Requirement (Property shall not be Violated)
Extends Modelica.Icons.Example
Using the Requirement block as
results in
![]() | |
| simulation result |
and gives the following output to the output window:
Requirements violated (1 of 3):
(R_violated at 1.5 s): Input gives a violated requirement
Requirements untested (1 of 3):
(R_Undecided): Input gives an undecided requirement
Requirements satisfied (1 of 3):
(R_Satisfied): Input gives a satisfied requirement
Components and variables
| Name | Type | Description |
|---|---|---|
check | Modelica.Blocks.Sources.BooleanTable | Boolean signal true until 1.5 s, toggling at 1.5, 3.3 and 4.2 s |
propertyConstant | Requirements.Sources.PropertyConstant | Constant Undecided property, so R_Undecided stays untested |
printViolations inner | Requirements.Verify.PrintViolations | Prints the requirement summary at 5 s |
R_violated | Requirements.Verify.Requirement | Requirement fed by the converted check signal: violated when check becomes false |
R_Satisfied | Requirements.Verify.Requirement | Requirement fed by a During check whose condition equals its check: always satisfied |
R_Undecided | Requirements.Verify.Requirement | Requirement fed by a constant Undecided property |
BtoP1 | Requirements.LogicalBlocks.BooleanToProperty | Converts check to a property (false is Violated, true is Satisfied) |
during1 | Requirements.ChecksInFixedWindow.During | While check is true, check must be true: never violated |

