Consumption

public struct Consumption

Describes capacity and the consumption of the EV.

  • Creates an instance of Consumption.

    Throws

    VehicleError.invalidVehicleSnapshot if speed consumption is invalid.

    Declaration

    Swift

    public init
        (
            auxiliaryPower: Measurement<UnitPower>? = nil,
            speedConsumption: [Measurement<UnitSpeed>: Measurement<TTUnitElectricEfficiency>]
        ) throws

    Parameters

    auxiliaryPower

    Specifies the power consumed by sustaining auxiliary systems. It can specify consumption from devices and systems such as climate control (AC and heat), radio, etc.

    speedConsumption

    Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in pairs.

  • Specifies the amount of power consumed by auxiliary systems. It can specify consumption due to devices and systems such as climate control (AC and heat), radio, etc.

    Declaration

    Swift

    public let auxiliaryPower: Measurement<UnitPower>?
  • Specifies the maximum electric energy supply that may be stored in the vehicle’s battery. Provided as an unordered list of speed/consumption-rate in pairs.

    Declaration

    Swift

    public let speedConsumption: [Measurement<UnitSpeed> : Measurement<TTUnitElectricEfficiency>]