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 start-up-curve, shut-down-curve is a mechanical-energy-flow motor-state is a state transformation-requirement convert-power-into-torque: must convert power into torque behavior-requirement motor-state-transitions: case start-up: when * c1: motor-control-signal is equal to "on" * c2: torque is smaller than 60.0 [Nm] then * r1: motor-state must be equal to "start-up" case steady-state: when * c1: motor-control-signal is equal to "on" * c2: torque is at least 60.0 [Nm] then * r1: motor-state must be equal to "steady-state" case shut-down: when * c1: motor-control-signal is equal to "off" * c2: torque is greater than 0.0 [Nm] then * r1: motor-state must be equal to "shut-down" case off: when * c1: motor-control-signal is equal to "off" * c2: torque is equal to 0.0 [Nm] then * r2: motor-state must be equal to "off" motor-torque-output: case motor-start-up: when * c1: motor-state is equal to "start-up" then * r1: torque must be equal to start-up-curve case motor-is-in-steady-state: when * c1: motor-state is equal to "steady-state" then * r1: torque must be equal to 60.0 [Nm] case motor-shut-down: when * c1: motor-state is equal to "shut-down" then * r2: torque must be equal to shut-down-curve case motor-is-off: when * c2: motor-state is equal to "off" then * r2: torque must be equal to 0.0 [Nm] relation torque-curves: torque-curve-model returning arguments * start-up-curve * shut-down-curve define relation torque-curve-model returning parameters * start-up-curve is a mechanical-energy-flow * shut-down-curve is a mechanical-energy-flow