@sh.add_function(
dsp,
inputs=['CVT', 'velocities', 'accelerations', 'gear_box_powers_out'],
outputs=['gear_box_speeds_in'],
out_weight={'gear_box_speeds_in': 10}
)
def predict_gear_box_speeds_in(
cvt, velocities, accelerations, gear_box_powers_out):
"""
Predicts gear box speed vector, gear vector, and maximum gear [RPM, -, -].
:param cvt:
Continuously variable transmission model.
:type cvt: callable
:param velocities:
Vehicle velocity [km/h].
:type velocities: numpy.array
:param accelerations:
Vehicle acceleration [m/s2].
:type accelerations: numpy.array
:param gear_box_powers_out:
Gear box power vector [kW].
:type gear_box_powers_out: numpy.array
:return:
Gear box speed vector, gear vector, and maximum gear [RPM, -, -].
:rtype: numpy.array, numpy.array, int
"""
return cvt.predict(velocities, accelerations, gear_box_powers_out)