ContinuousClock ​
Generates a continuous time signal that starts counting from a specified time.
A clock component that outputs a continuously increasing signal starting from a specified time. The output equals the offset value until the simulation time reaches start_time, after which it increases linearly with time. The output value is calculated as offset + (time - start_time) when time exceeds start_time, otherwise it remains at the offset value.
This component extends from Signal
Usage ​
BlockComponents.ContinuousClock(start_time=0.0, offset=0.0)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
start_time | Time at which the signal starts changing from its offset value | s | 0 |
offset | Constant value added to the signal output | – | 0 |
Connectors ​
y- This connector represents a real signal as an output from a component (RealOutput)
Behavior ​
Source ​
dyad
"""
Generates a continuous time signal that starts counting from a specified time.
A clock component that outputs a continuously increasing signal starting from a
specified time. The output equals the `offset` value until the simulation time
reaches `start_time`, after which it increases linearly with time. The output
value is calculated as `offset` + (`time` - `start_time`) when `time` exceeds
`start_time`, otherwise it remains at the `offset` value.
"""
component ContinuousClock
extends Signal
relations
"Output equals `offset` if `time` < `start_time`, otherwise increases with time"
y = ifelse(start_time < time, offset + time - start_time, offset)
metadata {"Dyad": {"icons": {"default": "dyad://BlockComponents/ContinuousClock.svg"}}}
endFlattened Source
dyad
"""
Generates a continuous time signal that starts counting from a specified time.
A clock component that outputs a continuously increasing signal starting from a
specified time. The output equals the `offset` value until the simulation time
reaches `start_time`, after which it increases linearly with time. The output
value is calculated as `offset` + (`time` - `start_time`) when `time` exceeds
`start_time`, otherwise it remains at the `offset` value.
"""
component ContinuousClock
"Real-valued output connector for the component"
y = RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0},
"diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
}
}
}
"Time at which the signal starts changing from its offset value"
parameter start_time::Time = 0.0
"Constant value added to the signal output"
parameter offset::Real = 0.0
relations
"Output equals `offset` if `time` < `start_time`, otherwise increases with time"
y = ifelse(start_time < time, offset + time - start_time, offset)
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://BlockComponents/ContinuousClock.svg"}
}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses
Tests