BatterySpecifications constructor
- double totalCapacityInKilowattHours = 0.0,
- double initialChargeInKilowattHours = 0.0,
- double targetChargeInKilowattHours = 0.0,
- Map<
double, double> chargingCurve = const {}, - List<
ChargingConnectorType> connectorTypes = const [], - double minChargeAtChargingStationInKilowattHours = 0.0,
- double? minChargeAtFirstChargingStationInKilowattHours = null,
- double minChargeAtDestinationInKilowattHours = 0.0,
- double? maxChargingVoltageInVolts = null,
- double? maxChargingCurrentInAmperes = null,
- Duration chargingSetupDuration = const Duration(seconds: 0),
- double? maxPowerAtLowVoltageInKilowatts = null,
Creates a new instance.
totalCapacityInKilowattHoursTotal capacity of the vehicle's battery (in kWh). It must be positive. Defaults to 0. Note: For a user-planned ChargingStop, this parameter is also required. If not set greater than 0, the route calculation will fail as an invalid parameter error.initialChargeInKilowattHoursCharge level of the vehicle's battery at the start of the route (in kWh). It must be non-negative and less than or equal to the value of BatterySpecifications.totalCapacityInKilowattHours, otherwise the BatterySpecifications instance is considered invalid. Defaults to 0. Note: For a user-planned ChargingStop, this parameter is also required. If not set greater than 0, the route calculation will fail as an an invalid parameter error.targetChargeInKilowattHoursMaximum charge to which the battery should be charged at a charging station (in kWh). It must be positive and less than or equal to the value of BatterySpecifications.totalCapacityInKilowattHours, otherwise the BatterySpecifications instance is considered invalid. Defaults to 0.chargingCurveFunction curve describing the maximum battery charging rate (in kW) at a given charge level (in kWh). Map keys represent charge levels that are non-negative floating point values in units of (kWh). Map values represent charging rate values that are positive floating point values in units of (kW). Given charge levels must cover the entire range of [0, BatterySpecifications.targetChargeInKilowattHours], otherwise the BatterySpecifications instance is considered invalid. The charging curve is considered piecewise constant instead of being interpolated. Defaults to an empty container. Note: For a user-planned ChargingStop, this parameter is also required. If one or more values are not set, the route calculation will fail as an invalid parameter error.connectorTypesList of available charging connector types. It must be at least one charging connector type added, otherwise the BatterySpecifications instance is considered invalid. Defaults to an empty container.minChargeAtChargingStationInKilowattHoursMinimum charge when arriving at a charging station in kWh. It must be non-negative and less than the value of BatterySpecifications.targetChargeInKilowattHours, otherwise the BatterySpecifications instance is considered invalid. Defaults to 0.minChargeAtFirstChargingStationInKilowattHoursMinimum charge when arriving at first charging station in kWh. This overrides BatterySpecifications.minChargeAtChargingStationInKilowattHours for the first charging station. If not specified, BatterySpecifications.minChargeAtChargingStationInKilowattHours will be used for all charging stations, including the first one. Defaults tonull. When initialized, it must be non-negative and less than the value of BatterySpecifications.targetChargeInKilowattHours, otherwise the BatterySpecifications instance is considered invalid. This is usually used when the current charge is too low to reach a charging station withinminChargeAtChargingStationlimits.minChargeAtDestinationInKilowattHoursMinimum charge at the final route destination in kWh. It must be non-negative and less than the value of BatterySpecifications.targetChargeInKilowattHours, otherwise the BatterySpecifications instance is considered invalid. Defaults to 0.maxChargingVoltageInVoltsMaximum charging voltage supported by the vehicle's battery in Volts. It must be positive. When omitted, the voltage is determined by the charging station attributes. Defaults tonull.maxChargingCurrentInAmperesMaximum charging current supported by the vehicle's battery in Amperes. It must be positive. When omitted, the charging current is determined by the charging station attributes. Defaults tonull.chargingSetupDurationTime in seconds spent after arriving at a charging station, but before actually charging, e.g., time spent for payment processing. Defaults to 0 seconds.maxPowerAtLowVoltageInKilowattsThe maximum power in kilowatts at which a vehicle can charge under given these conditions:
- The charging station connector's maximum supply voltage is less than 800 V.
- BatterySpecifications.maxChargingVoltageInVolts is greater than or equal to 800 V.
The provided value must be greater than or equal to 0. By default, it is not set.
Note: The feature is not supported by the
OfflineRoutingEngine.
Implementation
BatterySpecifications([double totalCapacityInKilowattHours = 0.0, double initialChargeInKilowattHours = 0.0, double targetChargeInKilowattHours = 0.0, Map<double, double> chargingCurve = const {}, List<ChargingConnectorType> connectorTypes = const [], double minChargeAtChargingStationInKilowattHours = 0.0, double? minChargeAtFirstChargingStationInKilowattHours = null, double minChargeAtDestinationInKilowattHours = 0.0, double? maxChargingVoltageInVolts = null, double? maxChargingCurrentInAmperes = null, Duration chargingSetupDuration = const Duration(seconds: 0), double? maxPowerAtLowVoltageInKilowatts = null])
: totalCapacityInKilowattHours = totalCapacityInKilowattHours, initialChargeInKilowattHours = initialChargeInKilowattHours, targetChargeInKilowattHours = targetChargeInKilowattHours, chargingCurve = chargingCurve, connectorTypes = connectorTypes, minChargeAtChargingStationInKilowattHours = minChargeAtChargingStationInKilowattHours, minChargeAtFirstChargingStationInKilowattHours = minChargeAtFirstChargingStationInKilowattHours, minChargeAtDestinationInKilowattHours = minChargeAtDestinationInKilowattHours, maxChargingVoltageInVolts = maxChargingVoltageInVolts, maxChargingCurrentInAmperes = maxChargingCurrentInAmperes, chargingSetupDuration = chargingSetupDuration, maxPowerAtLowVoltageInKilowatts = maxPowerAtLowVoltageInKilowatts;