@sh.add_function(dsp, outputs=['is_hybrid'])
def identify_is_hybrid(
has_motor_p0, has_motor_p1, has_motor_p2, has_motor_p2_planetary,
has_motor_p3_front, has_motor_p3_rear, has_motor_p4_front,
has_motor_p4_rear):
"""
Identifies if the the vehicle is hybrid.
:param has_motor_p0:
Has the vehicle a motor in P0?
:type has_motor_p0: bool
:param has_motor_p1:
Has the vehicle a motor in P1?
:type has_motor_p1: bool
:param has_motor_p2:
Has the vehicle a motor in P2?
:type has_motor_p2: bool
:param has_motor_p2_planetary:
Has the vehicle a motor in planetary P2?
:type has_motor_p2_planetary: bool
:param has_motor_p3_front:
Has the vehicle a motor in P3 front?
:type has_motor_p3_front: bool
:param has_motor_p3_rear:
Has the vehicle a motor in P3 rear?
:type has_motor_p3_rear: bool
:param has_motor_p4_front:
Has the vehicle a motor in P4 front?
:type has_motor_p4_front: bool
:param has_motor_p4_rear:
Has the vehicle a motor in P4 rear?
:type has_motor_p4_rear: bool
:return:
Is the vehicle hybrid?
:rtype: bool
"""
b = has_motor_p0, has_motor_p1, has_motor_p2, has_motor_p2_planetary,
b += has_motor_p3_front, has_motor_p3_rear, has_motor_p4_front
b += has_motor_p4_rear,
return any(b)