@sh.add_function(
dsp, inputs=['motor_p4_front_maximum_power'], outputs=['has_motor_p4_front']
)
@sh.add_function(
dsp, inputs=['motor_p4_rear_maximum_power'], outputs=['has_motor_p4_rear']
)
def identify_has_motor_p4(motor_p4_maximum_power):
"""
Identify if the vehicle has a motor P4 [kW].
:param motor_p4_maximum_power:
Maximum power of motor P4 [kW].
:type motor_p4_maximum_power: float
:return:
Has the vehicle a motor in P4?
:rtype: bool
"""
return not np.isclose(motor_p4_maximum_power, 0)