@sh.add_function(dsp, outputs=['ems_model'])
def define_ems_model(
has_motor_p2_planetary, is_serial, drive_battery_model, hev_power_model,
fuel_map_model, serial_motor_maximum_power_function,
engine_power_losses_function, ecms_s):
"""
Define Energy Management Strategy model.
:param has_motor_p2_planetary:
Has the vehicle a motor in planetary P2?
:type has_motor_p2_planetary: bool
:param is_serial:
Is the vehicle serial hybrid?
:type is_serial: bool
:param drive_battery_model:
Drive battery current model.
:type drive_battery_model: DriveBatteryModel
:param hev_power_model:
Hybrid Electric Vehicle power balance model.
:type hev_power_model: HEV
:param fuel_map_model:
Fuel map model.
:type fuel_map_model: FuelMapModel
:param serial_motor_maximum_power_function:
Serial motor maximum power function.
:type serial_motor_maximum_power_function: function
:param engine_power_losses_function:
Engine power losses function.
:type engine_power_losses_function: function
:param ecms_s:
Equivalent Consumption Minimization Strategy params.
:type ecms_s: tuple[float]
:return:
Energy Management Strategy model.
:rtype: EMS
"""
return EMS(
has_motor_p2_planetary, is_serial, drive_battery_model, hev_power_model,
fuel_map_model, serial_motor_maximum_power_function,
engine_power_losses_function, s_ch=ecms_s[0], s_ds=ecms_s[1]
)