Skip to main content

CHAMPPy - Mobility and Charging Profiles in Python

Project description

CHAMPPy

PyPI version Python versions PyPI downloads License Docs

CHAMPPy (Charging and Mobility Profiles in Python) is a Python library to generate synthetic mobility and charging profiles for different types of electric vehicles (EVs) including vans, trucks, busses and passanger cars.

Graphical Abstract

Road transport decarbonization requires realistic charging demand models across all vehicle classes. However, most existing studies and publicly available tools focus on private passenger cars. Commercial electric vehicles such as vans and trucks are often underrepresented despite their major relevance for emissions and grid impacts. CHAMPPy is an open Python package that addresses this gap by generating synthetic driving and charging profiles for different EV types, including commercial fleets. The model combines a Markov chain to represent vehicle locations over time with beta-distributed journey speeds, from which trip distances are derived, and uses dedicated algorithms to generate mobility and charging profiles. An optional clustering approach increases profile heterogeneity and is particularly useful when analyzing individual profiles.

๐Ÿ› ๏ธ CHAMPPy supports two workflows:

  1. ๐Ÿš€ Light: Use existing parameters to quickly generate drving and charging profiles with user-defined settings (e.g., simulation period, number of vehicles, charging power, battery capacity). An example of this workflow is provided in notebooks/01_demo_without_parameterization.ipynb.
  2. ๐Ÿงช Full: Re-parameterize the model with custom reference data (e.g. driving data for other countries, vehicle classes, or fleets). Afterwards, you can generate drving and charging profiles from your model parameters. An example of this workflow is provided in notebooks/02_demo_with_parameterization.ipynb

Links

Authors

CHAMPPy has been developed by Florian Biedenbach (lead), Valentin Preis und Daniel Godin.

Repo structure

CHAMPPy/
โ”œโ”€โ”€ src/champpy/                        # Main package source code
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ core/                           # Core functionality
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ charging/                   # Charging profile module
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ charging_model.py       # Model to generate charging profiles
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ charging_validation.py  # Charging validation & plotting
โ”‚   โ”‚   โ””โ”€โ”€ mobility/                   # Mobility profile module
โ”‚   โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚       โ”œโ”€โ”€ mobility_cleaning.py    # Data cleaning
โ”‚   โ”‚       โ”œโ”€โ”€ mobility_components.py  # Data components
โ”‚   โ”‚       โ”œโ”€โ”€ mobility_data.py        # Data structures
โ”‚   โ”‚       โ”œโ”€โ”€ mobility_model.py       # Model to generate profiles
โ”‚   โ”‚       โ”œโ”€โ”€ mobility_validation.py  # Validation & plotting
โ”‚   โ”‚       โ””โ”€โ”€ parameterization.py     # Parameter extraction
โ”‚   โ”œโ”€โ”€ utils/                          # Utilities
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ data_utils.py               # Ddata helpers
โ”‚   โ”‚   โ”œโ”€โ”€ logging.py                  # Logging configuration
โ”‚   โ”‚   โ””โ”€โ”€ time_utils.py               # Time utilities
|   โ””โ”€โ”€ data/                       
โ”‚       โ”œโ”€โ”€ params_info.parquet         # Info about existing model parameters
โ”‚       โ””โ”€โ”€ params.parquet              # Existing model parameters
โ”œโ”€โ”€ notebooks/                          # Jupyter notebooks
โ”‚   โ”œโ”€โ”€ 01_demo_without_parameterization.ipynb # Demo notebook 1
โ”‚   โ””โ”€โ”€ 02_demo_including_parameterization.ipynb # Demo notebook 2
โ”œโ”€โ”€ scripts/                            # Python scripts
โ”œโ”€โ”€ tests/                              # Test suite
โ”œโ”€โ”€ data/                               # Data directory
โ”œโ”€โ”€ plots/                              # Generated plots (HTML files)
โ”œโ”€โ”€ pyproject.toml                      # Project configuration
โ”œโ”€โ”€ LICENSE                             # License file
โ””โ”€โ”€  README.md                          # This file

Installation

To install CHAMPPy on Windows, follow the steps below. For installation on Linux/Mac, please check the installation documentation.

Prerequisites

  • Python 3.11 or higher
  • pip

Install from source on windows

# Clone the repository
git clone https://github.com/ffe-munich/CHAMPPy.git
cd CHAMPPy

# Create a virtual environment
py -m venv .venv

# Activate virtual environment
.\.venv\Scripts\activate


# Install the package
pip install .

Install from PyPI on windows

# Create a virtual environment
py -m venv .venv

# Activate virtual environment
.\.venv\Scripts\activate

pip install champpy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

champpy-0.1.4.tar.gz (309.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

champpy-0.1.4-py3-none-any.whl (167.3 kB view details)

Uploaded Python 3

File details

Details for the file champpy-0.1.4.tar.gz.

File metadata

  • Download URL: champpy-0.1.4.tar.gz
  • Upload date:
  • Size: 309.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for champpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9f44ea17f7b3066316bc488400752a565e0ccf967960d3ba2f56365f185df1b1
MD5 2ce036d53de4361927b19b75ae57940e
BLAKE2b-256 f02089c0f6ed9867868f58d111b81cbf56d6c79fa96c71ee53d5b41fcd3eff04

See more details on using hashes here.

Provenance

The following attestation bundles were made for champpy-0.1.4.tar.gz:

Publisher: ci.yml on ffe-munich/CHAMPPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file champpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: champpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 167.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for champpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba013c0f62380eea8bbebc6d4b6dcb93ce1c5aaed8d1ad0eb222d1277ced9db
MD5 bd726589e8d49f7757869a5792318f55
BLAKE2b-256 eb05efc4666b1d213d14b071ab9470e8beaf530d140028b76cb4544e4db1c5bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for champpy-0.1.4-py3-none-any.whl:

Publisher: ci.yml on ffe-munich/CHAMPPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page