Learn R Programming

evsim

Overview

evsim is part of a suite of packages to analyse, model and simulate the charging behavior of electric vehicle users:

  • evprof: Electric Vehicle PROFiling
  • evsim: Electric Vehicle SIMulation

evsim package provides the functions for:

  • Simulating new EV sessions based on Gaussian Mixture Models created with package {evprof}
  • Calculating the power demand from a data set of EV sessions in a specific time resolution
  • Calculating the occupancy (number of vehicles connected) in a specific time resolution

Usage

If you have your own data set of EV charging sessions or you have already built your EV model with evprof, the best place to start is the Get started chapter in the package website.

Installation

You can install the package from CRAN or the latest development version from GitHub:

# CRAN stable release
install.packages("evsim")

# install.packages("pak")
pak::pak("resourcefully-dev/evsim")

Getting help

If you encounter a clear bug, please open an issue with a minimal reproducible example on GitHub.

For further technical details, you can read the following academic articles about the methodology used in this paper:

  • Increasing hosting capacity of low-voltage distribution network using smart charging based on local and dynamic capacity limits. Sustainable Energy, Grids and Networks, vol. 41. Elsevier BV, p. 101626, March 2025. DOI link.
  • Assessment of electric vehicle charging hub based on stochastic models of user profiles. Expert Systems with Applications (Vol. 227, p. 120318). Elsevier BV. May 2023. DOI link.
  • Potential benefits of scheduling electric vehicle sessions over limiting charging power. CIRED Porto Workshop 2022: E-mobility and power distribution systems. Institution of Engineering and Technology, 2022. DOI link.
  • Flexibility management of electric vehicles based on user profiles: The Arnhem case study. International Journal of Electrical Power and Energy Systems, vol. 133. Elsevier BV, p. 107195, Dec. 2021. DOI link.
  • Electric vehicle user profiles for aggregated flexibility planning. IEEE PES Innovative Smart Grid Technologies Europe (ISGT Europe). IEEE, Oct. 18, 2021. DOI link.

Acknowledgements

This work started under a PhD program in the the University of Girona in collaboration with Resourcefully, the energy transition consulting company that currently supports the development and maintenance.

Copy Link

Version

Install

install.packages('evsim')

Monthly Downloads

209

Version

1.7.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marc Cañigueral

Last Published

December 19th, 2025

Functions in evsim (1.7.1)

get_evmodel_summary

Get evmodel parameters in a list of summary tables
get_occupancy

Time-series EV occupancy
get_user_profiles_distribution

User profiles distribution
plot_occupancy_duration_curve

Plot the occupancy duration curve
is_aligned

Is the sessions data set aligned in time?
prepare_model

Prepare the models from the evmodel object ready for the simulation
save_ev_model

Save the EV model
round_to_interval

Round a numeric value to interval
get_demand

Time-series EV demand
print.evmodel

print method for evmodel object class
read_ev_model

Read EV model
simulate_sessions

Simulation of EV sessions
sessions_feature_names

Names of standard features of a sessions dataset
add_charging_infrastructure

Assign a charging station to EV charging sessions
adapt_charging_features

Adapt charging features
estimate_energy

Estimate sessions energy values following a Gaussian distribution. The minimum considered value is 1kWh based on real data analysis.
get_evmodel_parameters

Get evmodel parameters in a list
get_custom_ev_model

Create the custom EV model
california_ev_sessions

EV charging sessions example
california_ev_model

EV model example
get_day_sessions

Get day sessions
get_connection_models_from_parameters

Connection GMM
convert_time_num_to_period

Convert numeric time value to a datetime period (hour-based)
california_ev_sessions_profiles

Clustered EV charging sessions example
expand_session

Expand a session along time slots within its connection time
expand_sessions

Expand sessions along time slots
estimate_sessions

Estimate sessions parameters of a specific profile
estimate_connection

Estimate sessions connection values
get_estimated_energy

Estimate energy given energy models tibble
get_energy_models_from_parameters

Energy GMM
get_estimated_connections

Get estimated profiles
get_charging_rates_distribution

Charging rates distribution