$(instance)AddTest Icon

AddTest

Usage

AddTest()

Behavior

\[ \begin{align} \mathtt{add.u1}\left( t \right) &= \mathtt{c1.y}\left( t \right) \\ \mathtt{add.u2}\left( t \right) &= \mathtt{c2.y}\left( t \right) \\ \mathtt{c1.y}\left( t \right) &= \mathtt{c1.k} \\ \mathtt{c2.y}\left( t \right) &= \mathtt{c2.k} \\ \mathtt{add.y}\left( t \right) &= \mathtt{add.k1} \mathtt{add.u1}\left( t \right) + \mathtt{add.k2} \mathtt{add.u2}\left( t \right) \end{align} \]

Source

component AddTest
  c1 = Constant(k=1)
  c2 = Constant(k=2)
  add = Add()
relations
  connect(add.u1, c1.y)
  connect(add.u2, c2.y)
metadata {
  "JuliaSim": {"tests": {"case1": {"stop": 5, "expect": {"final": {"add.y": 3}}}}}
}
end
Flattened Source
component AddTest
  c1 = Constant(k=1)
  c2 = Constant(k=2)
  add = Add()
relations
  connect(add.u1, c1.y)
  connect(add.u2, c2.y)
metadata {
  "JuliaSim": {"tests": {"case1": {"stop": 5, "expect": {"final": {"add.y": 3}}}}}
}
end

Test Cases

Test Case case1

  • Examples
  • Experiments
  • Analyses