pub struct Config {
pub timezone: Tz,
pub end_date_time: DateTime<Utc>,
pub max_current_supply_amp: Decimal,
pub max_energy_battery_kwh: Decimal,
pub max_power_supply_kw: Decimal,
pub start_date_time: DateTime<Utc>,
}Expand description
The config for generating a CDR from a tariff.
Fields§
§timezone: TzThe timezone of the EVSE: The timezone where the chargesession took place.
end_date_time: DateTime<Utc>The start date of the generated CDR.
max_current_supply_amp: DecimalThe maximum DC current that can be delivered to the battery.
max_energy_battery_kwh: DecimalThe maximum energy(kWh) the vehicle can accept.
We don’t model charging curves for the battery, so we don’t care about the existing change of the battery.
max_power_supply_kw: DecimalThe maximum DC power(kw) that can be delivered to the battery.
This is modeled as a DC system as we don’t care if the delivery medium is DC or one of the
various AC forms. We only care what the effective DC power is. The caller of cdr_from_tariff
should convert the delivery medium into a DC kw power by using a power factor.
In practice the maximum power bottleneck is either the EVSE, the cable or the battery itself. But whatever the bottleneck is, the caller should work that out and set the maximum expected.
start_date_time: DateTime<Utc>The start date of the generated CDR.