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 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.1.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.1-py3-none-any.whl (65.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: champpy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 460db63ba71c33c30ce3af2ca8270b18abfd5d1154d9cf39532c57c4502bf0bf
MD5 56aaedffa9409cd250921bb7e994d19e
BLAKE2b-256 7d2c76124880b1f5b223ace31da1f76b6b7fe5afb6cffd250d306f9c8e7452be

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: champpy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1bc9ca345963fc6df27f8afa486c65a400eef58c3df0a7971a0c2cd6713b8f3
MD5 820a35dc748659a8eedef1c557bedb8a
BLAKE2b-256 26225351f252cb16898427d5136d55c523999f4791254652d0ea5eb7e319a535

See more details on using hashes here.

Provenance

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