Regen#

class physics.models.regen.BasicRegen(vehicle_mass)#

Bases: BaseRegen

EFFICIENCY = 0.5#
GRAVITY = 9.81#
calculate_produced_energy(speed_kmh, gis_route_elevations, min_regen_speed, max_power)#

Returns a numpy array containing the energy produced by regen during each tick of the race based on the change in energy in that tick :param speed_kmh: an array containing the speeds at each tick :param gis_route_elevations: an array containing elevations on the route at each tick

get_regen_efficiency(speed_array)#

Returns a numpy array of regen efficiency percentage based on the vehicle speed in m/s.

Parameters:

speed_array – a numpy array of speeds in m/s

Returns:

numpy array of regen efficiency percentage

class physics.models.regen.BaseRegen#

Bases: ABC