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. driving data for other countries, vehicle classes, or fleets). Afterwards, you can 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

To install Champy on Windows, follow the step below. For installation on Linux/Mac, please check the installation documentation on Read the Docs.

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

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.3.tar.gz (309.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.3-py3-none-any.whl (167.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: champpy-0.1.3.tar.gz
  • Upload date:
  • Size: 309.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.3.tar.gz
Algorithm Hash digest
SHA256 630ce1df3de6636cf5b6d5399eeee3473bb4b53122599d743e5f07759943c67e
MD5 803d0247e28127cc9000751063e5a975
BLAKE2b-256 ff48e8401e93de23177cd228ffbb53c6b0e46431d33882ac3a46e79ec4829e41

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: champpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 167.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8d5cd6c08c0dd952175d858097688f6ddbe28e3b7e8796f6bcbbb5f3af8fd251
MD5 b303a7db775089b2a58af541e630b372
BLAKE2b-256 f121ce8c44eca1b0d8a8c8ab75355d89bfa4c80c1237d2c849fc87f7b876466d

See more details on using hashes here.

Provenance

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