define type control-signal is a string voltage is a real with unit V electrical-energy-flow mechanical-energy-flow with unit Nm state is a string define verb send to convert into world variables motor-control-signal is a control-signal components switch is a WirelessSwitch with arguments * motor-control-signal motor is an ElectricMotor with arguments * motor-control-signal goal-requirement send-control-signal: switch must send motor-control-signal to motor define component WirelessSwitch parameter motor-control-signal is a control-signal variable switch-circuit-voltage is a voltage transformation-requirement convert-voltage-to-control-signal: must convert switch-circuit-voltage into motor-control-signal behavior-requirement motor-control-signal-value: case switch-motor-on: when * c1: switch-circuit-voltage is at least 1.0 [V] then * r1: motor-control-signal must be equal to "on" case switch-motor-off: when * c1: switch-circuit-voltage is smaller than 1.0 [V] then * r1: motor-control-signal is equal to "off" define component ElectricMotor parameter motor-control-signal is a control-signal variables power is an electrical-energy-flow torque is a mechanical-energy-flow transformation-requirement convert-power-into-torque: must convert power into torque behavior-requirement motor-torque-output: case motor-is-on: when * c1: motor-control-signal is equal to "on" then * r1: torque must be equal to 60.0 [Nm] case motor-is-off: when * c2: motor-control-signal is equal to "off" then * r2: torque must be equal to 0.0 [Nm]