suboptimumg.vehicle.accumulator.accumulator#

class suboptimumg.vehicle.accumulator.accumulator.Accumulator(vehicle_model)[source]#

Bases: object

Parameters:

vehicle_model (VehicleModel)

capacity_to_mass(capacity)[source]#

Compute the total vehicle mass (kg) corresponding to a given battery capacity (kWh), assuming that any extra mass can be solely used to increase battery mass. Should be used when trying to modify the mass of the car based on a desired battery capacity.

Parameters:

capacity (float) – Battery capacity (kWh) for which to compute the corresponding total vehicle mass.

Returns:

Total vehicle mass (kg)

Return type:

float

mass_to_capacity(mass)[source]#

Compute the battery capacity (kWh) corresponding to a given total vehicle mass (kg), assuming the mass difference from the current car mass is solely due to changes in battery mass based on the energy density. Should be used when trying to check if the mass of the car provides sufficient battery capacity.

Parameters:

mass (float) – Total vehicle mass (kg) for which to compute the corresponding battery capacity.

Returns:

Battery capacity (kWh)

Return type:

float