LIBRARY
Sources.BooleanStep
Generate step signal of type Boolean.
The Boolean output y is a step signal that transitions from startValue to !startValue at time = startTime.
This component extends from BlockComponents.Interfaces.PartialBooleanSource
Usage
BlockComponents.Sources.BooleanStep(startTime=0, startValue=false)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
startTime | Time instant of step start | s | 0 |
startValue | Output before startTime | – | false |
Connectors
y- This connector represents a boolean signal as an output from a component (BooleanOutput)
Behavior
Source
dyad
"""
Generate step signal of type Boolean.
The Boolean output y is a step signal that transitions from `startValue`
to `!startValue` at time = `startTime`.
"""
component BooleanStep
extends BlockComponents.Interfaces.PartialBooleanSource
"Time instant of step start"
parameter startTime::Time = 0
"Output before startTime"
parameter startValue::Boolean = false
relations
y = ifelse(time >= startTime, !startValue, startValue)
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://BlockComponents/BooleanStep.svg"}
}
}
endFlattened Source
dyad
"""
Generate step signal of type Boolean.
The Boolean output y is a step signal that transitions from `startValue`
to `!startValue` at time = `startTime`.
"""
component BooleanStep
"Connector of Boolean output signal"
y = BooleanOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
},
"tags": []
}
}
"Time instant of step start"
parameter startTime::Time = 0
"Output before startTime"
parameter startValue::Boolean = false
relations
y = ifelse(time >= startTime, !startValue, startValue)
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://BlockComponents/BooleanStep.svg"}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses
Tests