Skip to main content

CHAMPPy - Mobility and Charging Profiles

Project description

CHAMPPy

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

Graphical Abstract

Road transport decarbonization requires realistic charging demand models across all vehicle classes. However, many existing studies and publicly available tools focus mainly on private passenger cars, while 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 behavior. An optional clustering approach increases profile heterogeneity and is particularly useful when analyzing individual profiles.

CHAMPPy supports two workflows:

  1. 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. 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 in development mode
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

For detailed examples, 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 raw 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.0.tar.gz (205.4 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.0-py3-none-any.whl (65.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: champpy-0.1.0.tar.gz
  • Upload date:
  • Size: 205.4 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.0.tar.gz
Algorithm Hash digest
SHA256 ce2ace92978409bdb12118042abc5afdeccb246e4f6725bd198897cbc953fd8d
MD5 765e22ecd0d04e61827bd1a1a21e5450
BLAKE2b-256 0074ff88012781aea3aa4008432e64565837990e7117c5bf0c61597cca2a7c8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for champpy-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: champpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 65.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff9c7fb7a813862467e63e68baaa71b0dc0f5a7b0fa992610bbcf5ed8aa7ccb
MD5 11c421c128db25169e229e3102d89dfc
BLAKE2b-256 f60456c907e048f095db1af8812f0a8e2f0a434fde9fe6f6cdcc458005b01827

See more details on using hashes here.

Provenance

The following attestation bundles were made for champpy-0.1.0-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