@sh.add_function(dsp, outputs=['service_battery_status_model'], weight=10)
def calibrate_service_battery_status_model(
is_hybrid, times, service_battery_charging_statuses,
service_battery_state_of_charges, motive_powers):
"""
Calibrates the service battery charging status model.
:param is_hybrid:
Is the vehicle hybrid?
:type is_hybrid: bool
:param times:
Time vector [s].
:type times: numpy.array
:param service_battery_charging_statuses:
Service battery charging statuses (0: Discharge, 1: Charging, 2: BERS,
3: Initialization) [-].
:type service_battery_charging_statuses: numpy.array
:param service_battery_state_of_charges:
State of charge of the service battery [%].
:type service_battery_state_of_charges: numpy.array
:param motive_powers:
Motive power [kW].
:type motive_powers: numpy.array
:return:
A function that predicts the service battery charging status.
:rtype: callable
"""
return BatteryStatusModel().fit(
is_hybrid, times, service_battery_charging_statuses,
service_battery_state_of_charges, motive_powers
)