@sh.add_function(
dsp, outputs=['motor_p4_front_maximum_powers'],
inputs=['motor_p4_front_speeds', 'motor_p4_front_maximum_power_function']
)
@sh.add_function(
dsp, outputs=['motor_p4_rear_maximum_powers'],
inputs=['motor_p4_rear_speeds', 'motor_p4_rear_maximum_power_function']
)
def calculate_motor_p4_maximum_powers(
motor_p4_speeds, motor_p4_maximum_power_function):
"""
Calculate the maximum power vector of motor P4 [kW].
:param motor_p4_speeds:
Rotating speed of motor P4 [RPM].
:type motor_p4_speeds: numpy.array | float
:param motor_p4_maximum_power_function:
Maximum power function of motor P4.
:type motor_p4_maximum_power_function: function
:return:
Maximum power vector of motor P4 [kW].
:rtype: numpy.array | float
"""
return motor_p4_maximum_power_function(motor_p4_speeds)