InterpolationJuliaHubDatasetTest ​
Test time-dependent interpolation of JuliaHub dataset values.
Creates a time-based interpolation from a JuliaHub dataset, integrating the interpolated values to produce the output variable.
The component loads time-series data from a specified JuliaHub dataset and uses quadratic interpolation to approximate the data at simulation time points. The derivative of the output variable is set equal to the interpolated value, causing the output to be the integral of the dataset values.
Usage ​
BlockComponents.InterpolationJuliaHubDatasetTest()
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
dataset | Reference to a dataset stored on JuliaHub, specifying the collection, dataset name, and which variables to extract | – | DyadTimeseries("dyad+juliahub://internal.juliahub.com/datasets/juliasimtutorials/circuit_data", dependent_vars=["ampermeter.i(t)"], independent_var="timestamp") |
Variables ​
| Name | Description | Units |
|---|---|---|
y | Output variable that integrates the interpolated dataset values | – |
Behavior ​
Behavior of this component cannot be rendered because it includes path variables.
Source ​
dyad
"""
Test time-dependent interpolation of JuliaHub dataset values.
Creates a time-based interpolation from a JuliaHub dataset, integrating the interpolated values to
produce the output variable.
The component loads time-series data from a specified JuliaHub dataset and uses quadratic
interpolation to approximate the data at simulation time points. The derivative of the output variable
is set equal to the interpolated value, causing the output to be the integral of the dataset values.
"""
test component InterpolationJuliaHubDatasetTest
"Interpolation block configured to use quadratic interpolation on the specified dataset"
interp = Interpolation(interpolation_type = InterpolationType.QuadraticInterpolation(), dataset = dataset) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 150, "x2": 250, "y2": 250, "rot": 0}
}
}
}
"Reference to a dataset stored on JuliaHub, specifying the collection, dataset name, and which variables to extract"
structural parameter dataset::DyadData.DyadTimeseries = DyadTimeseries("dyad+juliahub://internal.juliahub.com/datasets/juliasimtutorials/circuit_data", dependent_vars = ["ampermeter.i(t)"], independent_var = "timestamp")
"Output variable that integrates the interpolated dataset values"
variable y::Real
relations
interp.u = time
interp.y = der(y)
initial y = 0
metadata {
"Dyad": {
"icons": {"default": "dyad://BlockComponents/Example.svg"},
"tests": {"case1": {"start": 0.001, "stop": 0.1, "expect": {"signals": ["y"]}}},
"doc": {"behavior": false}
}
}
endFlattened Source
dyad
"""
Test time-dependent interpolation of JuliaHub dataset values.
Creates a time-based interpolation from a JuliaHub dataset, integrating the interpolated values to
produce the output variable.
The component loads time-series data from a specified JuliaHub dataset and uses quadratic
interpolation to approximate the data at simulation time points. The derivative of the output variable
is set equal to the interpolated value, causing the output to be the integral of the dataset values.
"""
test component InterpolationJuliaHubDatasetTest
"Interpolation block configured to use quadratic interpolation on the specified dataset"
interp = Interpolation(interpolation_type = InterpolationType.QuadraticInterpolation(), dataset = dataset) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 150, "x2": 250, "y2": 250, "rot": 0}
}
}
}
"Reference to a dataset stored on JuliaHub, specifying the collection, dataset name, and which variables to extract"
structural parameter dataset::DyadData.DyadTimeseries = DyadTimeseries("dyad+juliahub://internal.juliahub.com/datasets/juliasimtutorials/circuit_data", dependent_vars = ["ampermeter.i(t)"], independent_var = "timestamp")
"Output variable that integrates the interpolated dataset values"
variable y::Real
relations
interp.u = time
interp.y = der(y)
initial y = 0
metadata {
"Dyad": {
"icons": {"default": "dyad://BlockComponents/Example.svg"},
"tests": {"case1": {"start": 0.001, "stop": 0.1, "expect": {"signals": ["y"]}}},
"doc": {"behavior": false}
}
}
endTest Cases ​
Test Case case1 ​
julia
pltRelated ​
Examples
Experiments
Analyses
Tests