CombustionEngine
public class CombustionEngine
A combustion vehicle engine for route planning and consumption estimation.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
public init( consumption: Consumption? = nil, efficiency: CombustionVehicleEfficiency? = nil, currentFuel: Measurement<UnitVolume>? = nil )Parameters
consumptionSpecifies the consumption model of the vehicle.
efficiencySpecifies the efficiency of the engine.
currentFuelCurrent amount of fuel, for example in liters.
-
Describes the capacity and consumption of a combustion vehicle.
Declaration
Swift
public typealias Consumption = ConsumptionModel<UnitFuelEfficiency, TTUnitFuelPerTime> -
Specifies the consumption model of the vehicle.
Declaration
Swift
public let consumption: Consumption? -
Specifies the efficiency of the engine.
Declaration
Swift
public let efficiency: CombustionVehicleEfficiency? -
Current amount of fuel, for example in liters.
Declaration
Swift
public let currentFuel: Measurement<UnitVolume>?
-
Copies the current CombustionEngine with changes specified in build closure
Declaration
Swift
public func copy(build: (inout Builder) -> ()) -> CombustionEngineParameters
buildThis closure allows for change of CombustionEngine values
Return Value
CombustionEngine with the changes set on the closure
-
The
Buildercreates a new instance ofCombustionEnginewith modified fields.Declaration
Swift
public struct Builder
CombustionEngine Class Reference