Test_Trigonometric Test_Trigonometric Icon

Test_Trigonometric

Usage

PrimitiveComponents.Test_Trigonometric()

Behavior

\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( sine_{+}y(t), sin_{+}u(t) \right) \\ \mathrm{connect}\left( sine_{+}y(t), cos_{+}u(t) \right) \\ \mathrm{connect}\left( sine_{+}y(t), tan_{+}u(t) \right) \\ \mathtt{sin.y}\left( t \right) = \sin\left( \mathtt{sin.u}\left( t \right) \right) \\ \mathtt{cos.y}\left( t \right) = \cos\left( \mathtt{cos.u}\left( t \right) \right) \\ \mathtt{tan.y}\left( t \right) = \tan\left( \mathtt{tan.u}\left( t \right) \right) \\ \mathtt{sine.y}\left( t \right) = \mathtt{sine.offset} + \mathtt{sine.amplitude} ifelse\left( t \geq \mathtt{sine.start\_time}, \sin\left( \mathtt{sine.phase} + 6.2832 \mathtt{sine.frequency} \left( - \mathtt{sine.start\_time} + t \right) \right), \sin\left( \mathtt{sine.phase} \right) \right) \\ \end{array} \right] \end{equation} \]

Source

component Test_Trigonometric
  sin = PrimitiveComponents.Mathematical.Sin() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 250, "x2": 690, "y2": 350, "rot": 0}
      }
    }
  }
  cos = PrimitiveComponents.Mathematical.Cos() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 450, "x2": 690, "y2": 550, "rot": 0}
      }
    }
  }
  tan = PrimitiveComponents.Mathematical.Tan() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 660, "x2": 690, "y2": 760, "rot": 0}
      }
    }
  }
  sine = BlockComponents.Sine(start_time = 5, amplitude = pi, frequency = 1 / 5) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 280, "y1": 450, "x2": 380, "y2": 550, "rot": 0}
      }
    }
  }
relations
  connect(sine.y, sin.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 300}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(sine.y, cos.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(sine.y, tan.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 710}], "E": 2}],
      "renderStyle": "standard"
    }
  }
metadata {
  "Dyad": {
    "experiments": {},
    "tests": {},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 1100,
        "rot": 0,
        "layer": "icon",
        "attrs": {}
      }
    ],
    "path": {},
    "doc": {"behavior": true}
  }
}
end
Flattened Source
component Test_Trigonometric
  sin = PrimitiveComponents.Mathematical.Sin() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 250, "x2": 690, "y2": 350, "rot": 0}
      }
    }
  }
  cos = PrimitiveComponents.Mathematical.Cos() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 450, "x2": 690, "y2": 550, "rot": 0}
      }
    }
  }
  tan = PrimitiveComponents.Mathematical.Tan() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 590, "y1": 660, "x2": 690, "y2": 760, "rot": 0}
      }
    }
  }
  sine = BlockComponents.Sine(start_time = 5, amplitude = pi, frequency = 1 / 5) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 280, "y1": 450, "x2": 380, "y2": 550, "rot": 0}
      }
    }
  }
relations
  connect(sine.y, sin.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 300}], "E": 2}],
      "renderStyle": "standard"
    }
  }
  connect(sine.y, cos.u) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
  connect(sine.y, tan.u) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 500, "y": 500}, {"x": 500, "y": 710}], "E": 2}],
      "renderStyle": "standard"
    }
  }
metadata {
  "Dyad": {
    "experiments": {},
    "tests": {},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 1100,
        "rot": 0,
        "layer": "icon",
        "attrs": {}
      }
    ],
    "path": {},
    "doc": {"behavior": true}
  }
}
end


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses