@sh.add_function(dsp, outputs=['engine_coolant_temperatures'])
def predict_engine_coolant_temperatures(
engine_temperature_regression_model, times, on_engine, velocities,
engine_speeds_out, accelerations, initial_engine_temperature,
max_engine_coolant_temperature):
"""
Predicts the engine temperature [°C].
:param engine_temperature_regression_model:
Engine temperature regression engine_temperature_regression_model.
:type engine_temperature_regression_model: callable
:param times:
Time vector [s].
:type times: numpy.array
:param accelerations:
Acceleration vector [m/s2].
:type accelerations: numpy.array
:param on_engine:
If the engine is on [-].
:type on_engine: numpy.array
:param velocities:
Velocity [km/h].
:type velocities: numpy.array
:param engine_speeds_out:
Engine speed [RPM].
:type engine_speeds_out: numpy.array
:param initial_engine_temperature:
Engine initial temperature [°C]
:type initial_engine_temperature: float
:param max_engine_coolant_temperature:
Maximum engine coolant temperature [°C].
:type max_engine_coolant_temperature: float
:return:
Engine coolant temperature vector [°C].
:rtype: numpy.array
"""
return engine_temperature_regression_model(
times, on_engine, velocities, engine_speeds_out, accelerations,
initial_temperature=initial_engine_temperature,
max_temp=max_engine_coolant_temperature
)