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).
  2. Full: Re-parameterize the model with custom reference data (e.g., other countries, fleet compositions, or vehicle classes). Generate drving and charging profiles from your model parameters.

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

Prerequisites

  • Python 3.11 or higher
  • pip

Install from source

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

# Create a virtual environment
python -m venv .venv

# Activate virtual environment
# On Windows:
.\.venv\Scripts\activate
# On Linux/Mac:
source .venv/bin/activate

# Install the package
pip install .

Install from PyPI

# Create a virtual environment
python -m venv .venv

# Activate virtual environment
# On Windows:
.\.venv\Scripts\activate
# On Linux/Mac:
source .venv/bin/activate

pip install champpy

Examples

To get started, check out the interactive Jupyter notebooks in the notebooks/ directory:

  1. 01_demo_without_parameterization.ipynb
    Simple demo showing how to generate mobility and charging profiles using existing model parameters.

  2. 02_demo_including_parameterization.ipynb
    Complete workflow including parameterization from reference data, model generation, and validation.

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.2.tar.gz (205.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.2-py3-none-any.whl (65.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: champpy-0.1.2.tar.gz
  • Upload date:
  • Size: 205.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.2.tar.gz
Algorithm Hash digest
SHA256 388eabd761eade92fcb1df75a99df2a76e1c488ca1090446c974eac2c8a356b1
MD5 1140cd24396400fee2d6e35d1a50c16c
BLAKE2b-256 8d1fd40a0f68891992f20d14fffc49f32fa592a704cb6bf3fc436e64c4e620b8

See more details on using hashes here.

Provenance

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

Publisher: publish.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.2-py3-none-any.whl.

File metadata

  • Download URL: champpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 65.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b5d4337107ae0cedebbea6451c6344d0f74a269578846a9a02c98167b8ad79f
MD5 1c4c4c3fd084b3dcdb142ff55d34a187
BLAKE2b-256 f8398a811eed24eac645f32a703f8cbedde3ca0bca1ac8195afc3063d576df8b

See more details on using hashes here.

Provenance

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

Publisher: publish.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