Step_IntegerOut Icon
Sources.Step_IntegerOut
Step_IntegerOut(; name, start_time = 0.0, height, offset)Generates an integer step signal that transitions from offset to height+offset at the specified time.
Parameters
start_time: Time at which the signal starts changing from its offset value (default: 0.0)height: Magnitude of the step changeoffset: Constant value added to the signal output
Variables
y(t): Integer-valued output connector for the component
Description
This component generates a step signal for integer values. Before start_time, the output is offset. At and after start_time, the output becomes height + offset.
Usage
PrimitiveComponents.Sources.Step_IntegerOut(start_time=0.0, height, offset)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
start_time | s | 0 | |
height | – | ||
offset | – |
Connectors
y- This connector represents an integer signal as an output from a component (IntegerOutput)
Behavior
\[ \begin{align} y\left( t \right) &= ifelse\left( t \geq \mathtt{start\_time}, \mathtt{height} + \mathtt{offset}, \mathtt{offset} \right) \end{align} \]
Source
"""
Step_IntegerOut(; name, start_time = 0.0, height, offset)
Generates an integer step signal that transitions from `offset` to `height+offset` at the specified time.
# Parameters
- `start_time`: Time at which the signal starts changing from its offset value (default: 0.0)
- `height`: Magnitude of the step change
- `offset`: Constant value added to the signal output
# Variables
- `y(t)`: Integer-valued output connector for the component
# Description
This component generates a step signal for integer values. Before `start_time`,
the output is `offset`. At and after `start_time`, the output becomes `height + offset`.
"""
component Step_IntegerOut
# Integer-valued output connector for the component
y = Dyad.IntegerOutput() {
"Dyad": {
"placement": {
"diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# Time at which the signal starts changing from its offset value
parameter start_time::Time = 0.0
# Magnitude of the step change
parameter height::Integer
# Constant value added to the signal output
parameter offset::Integer()
relations
y = ifelse(time >= start_time, height + offset, offset)
metadata {
"Dyad": {"labels": [{"label": "$(instance)", "x": 500, "y": 1100}]},
"icons": {"default": "dyad://BlockComponents/Step.svg"}
}
end
Flattened Source
"""
Step_IntegerOut(; name, start_time = 0.0, height, offset)
Generates an integer step signal that transitions from `offset` to `height+offset` at the specified time.
# Parameters
- `start_time`: Time at which the signal starts changing from its offset value (default: 0.0)
- `height`: Magnitude of the step change
- `offset`: Constant value added to the signal output
# Variables
- `y(t)`: Integer-valued output connector for the component
# Description
This component generates a step signal for integer values. Before `start_time`,
the output is `offset`. At and after `start_time`, the output becomes `height + offset`.
"""
component Step_IntegerOut
# Integer-valued output connector for the component
y = Dyad.IntegerOutput() {
"Dyad": {
"placement": {
"diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# Time at which the signal starts changing from its offset value
parameter start_time::Time = 0.0
# Magnitude of the step change
parameter height::Integer
# Constant value added to the signal output
parameter offset::Integer()
relations
y = ifelse(time >= start_time, height + offset, offset)
metadata {
"Dyad": {"labels": [{"label": "$(instance)", "x": 500, "y": 1100}]},
"icons": {"default": "dyad://BlockComponents/Step.svg"}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses