ConstantsAndExpressions model
Requirements.Examples.Elementary.Sources.ConstantsAndExpressions
ยท source
Examples for XXXConstant and XXXExpressions
Extends Modelica.Icons.Example
Demonstrates the constant and expression sources of package Sources. The expression
blocks output a time-varying value defined by a modifier of their output y: expr1 the Real
expression time/2, expr2 the Integer expression integer(time) and expr3 the Boolean expression
that is true on [1, 3) s. The constant blocks output the value of their parameter c: 1.234
(const1), false (const2), 123 (const3) and Undecided (const4). Plot
the outputs over the simulation time of 4 s to see the signals.
Components and variables
| Name | Type | Description |
|---|---|---|
expr1 | Requirements.Sources.RealExpression | Real expression time/2 |
expr2 | Requirements.Sources.IntegerExpression | Integer expression integer(time) |
expr3 | Requirements.Sources.BooleanExpression | Boolean expression, true on [1, 3) s |
const1 | Requirements.Sources.RealConstant | Real constant 1.234 |
const2 | Requirements.Sources.BooleanConstant | Boolean constant false |
const3 | Requirements.Sources.IntegerConstant | Integer constant 123 |
const4 | Requirements.Sources.PropertyConstant | Property constant Undecided |