Test_Exp Icon
Test_Exp
Usage
PrimitiveComponents.Test_Exp()
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( sine_{1_{+}y(t)}, exp_{+}u(t) \right) \\ \mathrm{connect}\left( sine_{1_{+}y(t)}, exp2_{+}u(t) \right) \\ \mathrm{connect}\left( sine_{1_{+}y(t)}, exp10_{+}u(t) \right) \\ \mathtt{sine\_1.y}\left( t \right) = \mathtt{sine\_1.offset} + \mathtt{sine\_1.amplitude} ifelse\left( t \geq \mathtt{sine\_1.start\_time}, \sin\left( \mathtt{sine\_1.phase} + 6.2832 \mathtt{sine\_1.frequency} \left( - \mathtt{sine\_1.start\_time} + t \right) \right), \sin\left( \mathtt{sine\_1.phase} \right) \right) \\ \mathtt{exp.y}\left( t \right) = e^{\mathtt{exp.u}\left( t \right)} \\ \mathtt{exp2.y}\left( t \right) = 2^{\mathtt{exp2.u}\left( t \right)} \\ \mathtt{exp10.y}\left( t \right) = 10^{\mathtt{exp10.u}\left( t \right)} \\ \end{array} \right] \end{equation} \]
Source
component Test_Exp
sine_1 = BlockComponents.Sine(start_time = 5, offset = 0, amplitude = 1, frequency = 1 / 5) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 220, "y1": 450, "x2": 320, "y2": 550, "rot": 0}
}
}
}
exp = PrimitiveComponents.Mathematical.Exp() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 250, "x2": 700, "y2": 350, "rot": 0}
}
}
}
exp2 = PrimitiveComponents.Mathematical.Exp2() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 450, "x2": 700, "y2": 550, "rot": 0}
}
}
}
exp10 = PrimitiveComponents.Mathematical.Exp10() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 650, "x2": 700, "y2": 750, "rot": 0}
}
}
}
relations
connect(exp.u, sine_1.y) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 500, "y": 300}, {"x": 500, "y": 500}], "E": 2}],
"renderStyle": "standard"
}
}
connect(sine_1.y, exp2.u) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(sine_1.y, exp10.u) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 700}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"experiments": {},
"tests": {
"case1": {
"stop": 10,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["sine_1.y", "exp.y", "exp2.y", "exp10.y"]}
}
},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"path": {},
"doc": {"behavior": true}
}
}
end
Flattened Source
component Test_Exp
sine_1 = BlockComponents.Sine(start_time = 5, offset = 0, amplitude = 1, frequency = 1 / 5) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 220, "y1": 450, "x2": 320, "y2": 550, "rot": 0}
}
}
}
exp = PrimitiveComponents.Mathematical.Exp() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 250, "x2": 700, "y2": 350, "rot": 0}
}
}
}
exp2 = PrimitiveComponents.Mathematical.Exp2() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 450, "x2": 700, "y2": 550, "rot": 0}
}
}
}
exp10 = PrimitiveComponents.Mathematical.Exp10() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 600, "y1": 650, "x2": 700, "y2": 750, "rot": 0}
}
}
}
relations
connect(exp.u, sine_1.y) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 500, "y": 300}, {"x": 500, "y": 500}], "E": 2}],
"renderStyle": "standard"
}
}
connect(sine_1.y, exp2.u) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(sine_1.y, exp10.u) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 700}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"experiments": {},
"tests": {
"case1": {
"stop": 10,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["sine_1.y", "exp.y", "exp2.y", "exp10.y"]}
}
},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"path": {},
"doc": {"behavior": true}
}
}
endTest Cases
Test Case case1
pltpltpltpltRelated
- Examples
- Experiments
- Analyses