Test_Signed_Sqrt Icon
Test_Signed_Sqrt
Usage
PrimitiveComponents.Test_Signed_Sqrt()
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( constant_{1_{+}y(t)}, signed_{sqrt\_1_{+}u(t)} \right) \\ \mathrm{connect}\left( constant_{2_{+}y(t)}, signed_{sqrt\_2_{+}u(t)} \right) \\ \mathrm{connect}\left( constant_{3_{+}y(t)}, signed_{sqrt\_3_{+}u(t)} \right) \\ \mathtt{signed\_sqrt\_1.y}\left( t \right) = \left( \left|\mathtt{signed\_sqrt\_1.u}\left( t \right)\right| \right)^{0.5} sign\left( \mathtt{signed\_sqrt\_1.u}\left( t \right) \right) \\ \mathtt{constant\_1.y}\left( t \right) = \mathtt{constant\_1.k} \\ \mathtt{signed\_sqrt\_2.y}\left( t \right) = \left( \left|\mathtt{signed\_sqrt\_2.u}\left( t \right)\right| \right)^{0.5} sign\left( \mathtt{signed\_sqrt\_2.u}\left( t \right) \right) \\ \mathtt{constant\_2.y}\left( t \right) = \mathtt{constant\_2.k} \\ \mathtt{signed\_sqrt\_3.y}\left( t \right) = \left( \left|\mathtt{signed\_sqrt\_3.u}\left( t \right)\right| \right)^{0.5} sign\left( \mathtt{signed\_sqrt\_3.u}\left( t \right) \right) \\ \mathtt{constant\_3.y}\left( t \right) = \mathtt{constant\_3.k} \\ \end{array} \right] \end{equation} \]
Source
component Test_Signed_Sqrt
signed_sqrt_1 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 330, "y1": 120, "x2": 430, "y2": 220, "rot": 0}
}
}
}
constant_1 = BlockComponents.Constant(k = 9) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 100, "y1": 120, "x2": 200, "y2": 220, "rot": 0}
}
}
}
signed_sqrt_2 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 330, "y1": 340, "x2": 430, "y2": 440, "rot": 0}
}
}
}
constant_2 = BlockComponents.Constant(k = -9) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 110, "y1": 340, "x2": 210, "y2": 440, "rot": 0}
}
}
}
signed_sqrt_3 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 840, "y1": 210, "x2": 940, "y2": 310, "rot": 0}
}
}
}
constant_3 = BlockComponents.Constant(k = 0) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 210, "x2": 650, "y2": 310, "rot": 0}
}
}
}
relations
connect(constant_1.y, signed_sqrt_1.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(constant_2.y, signed_sqrt_2.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(signed_sqrt_3.u, constant_3.y) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
"Dyad": {
"experiments": {},
"tests": {
"case1": {
"stop": 3,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["signed_sqrt_1.y", "signed_sqrt_2.y", "signed_sqrt_3.y"]}
}
},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"path": {},
"doc": {"behavior": true}
}
}
end
Flattened Source
component Test_Signed_Sqrt
signed_sqrt_1 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 330, "y1": 120, "x2": 430, "y2": 220, "rot": 0}
}
}
}
constant_1 = BlockComponents.Constant(k = 9) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 100, "y1": 120, "x2": 200, "y2": 220, "rot": 0}
}
}
}
signed_sqrt_2 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 330, "y1": 340, "x2": 430, "y2": 440, "rot": 0}
}
}
}
constant_2 = BlockComponents.Constant(k = -9) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 110, "y1": 340, "x2": 210, "y2": 440, "rot": 0}
}
}
}
signed_sqrt_3 = PrimitiveComponents.Mathematical.Signed_Sqrt() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 840, "y1": 210, "x2": 940, "y2": 310, "rot": 0}
}
}
}
constant_3 = BlockComponents.Constant(k = 0) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 210, "x2": 650, "y2": 310, "rot": 0}
}
}
}
relations
connect(constant_1.y, signed_sqrt_1.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(constant_2.y, signed_sqrt_2.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(signed_sqrt_3.u, constant_3.y) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
"Dyad": {
"experiments": {},
"tests": {
"case1": {
"stop": 3,
"abstol": 0.00001,
"reltol": 0.00001,
"expect": {"signals": ["signed_sqrt_1.y", "signed_sqrt_2.y", "signed_sqrt_3.y"]}
}
},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"path": {},
"doc": {"behavior": true}
}
}
endTest Cases
Test Case case1
pltpltpltRelated
- Examples
- Experiments
- Analyses