adapt_charging_features {evsim}R Documentation

Adapt charging features

Description

Calculate connection and charging times according to energy, power and time resolution

Usage

adapt_charging_features(
  sessions,
  time_resolution = 15,
  power_resolution = 0.01
)

Arguments

sessions

tibble, sessions data set in standard format marked by {evprof} package (see this article)

time_resolution

integer, time resolution (in minutes) of the sessions' datetime variables

power_resolution

numeric, power resolution (in kW) of the sessions' power

Details

All sessions' Power must be higher than 0, to avoid NaN values from dividing by zero. The ConnectionStartDateTime is first aligned to the desired time resolution, and the ConnectionEndDateTime is calculated according to the ConnectionHours. The ChargingHours is recalculated with the values of Energy and Power, limited by ConnectionHours. Finally, the charging times are also calculated.

Value

tibble

Examples

suppressMessages(library(dplyr))

sessions <- head(evsim::california_ev_sessions, 10)

sessions %>%
  select(ConnectionStartDateTime, ConnectionEndDateTime, Power)

adapt_charging_features(
  sessions,
  time_resolution = 60,
  power_resolution = 0.01
) %>%
  select(ConnectionStartDateTime, ConnectionEndDateTime, Power)

adapt_charging_features(
  sessions,
  time_resolution = 15,
  power_resolution = 1
) %>%
  select(ConnectionStartDateTime, ConnectionEndDateTime, Power)



[Package evsim version 1.5.0 Index]