@sh.add_function(dsp, outputs=['GSPV'])
def calibrate_gspv(
gears, velocities, motive_powers, velocity_speed_ratios, stop_velocity):
"""
Identifies gear shifting power velocity matrix.
:param gears:
Gear vector [-].
:type gears: numpy.array
:param velocities:
Vehicle velocity [km/h].
:type velocities: numpy.array
:param motive_powers:
Motive power [kW].
:type motive_powers: numpy.array
:param velocity_speed_ratios:
Constant velocity speed ratios of the gear box [km/(h*RPM)].
:type velocity_speed_ratios: dict[int | float]
:param stop_velocity:
Maximum velocity to consider the vehicle stopped [km/h].
:type stop_velocity: float
:return:
Gear shifting power velocity matrix.
:rtype: dict
"""
gspv = GSPV().fit(
gears, velocities, motive_powers, velocity_speed_ratios, stop_velocity
)
return gspv