@sh.add_function(dsp, outputs=[
'service_battery_state_of_charge_balance',
'service_battery_state_of_charge_balance_window'
])
def identify_service_battery_state_of_charge_balance_and_window(
service_battery_status_model):
"""
Identify the service battery state of charge balance and window [%].
:param service_battery_status_model:
A function that predicts the service battery charging status.
:type service_battery_status_model: BatteryStatusModel
:return:
Service battery state of charge balance and window [%].
:rtype: float, float
"""
model = service_battery_status_model
state_of_charge_balance_window = model.max - model.min
state_of_charge_balance = model.min + state_of_charge_balance_window / 2
return state_of_charge_balance, state_of_charge_balance_window