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

Uploaded Python 3

File details

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

File metadata

  • Download URL: champpy-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 72bef38fb47f76cf2d84e0236ecf32a720b21bfdea33dfd12bdc90045d2ab2ff
MD5 22cb888edc088ae9f1167b7340e40bdf
BLAKE2b-256 947da6053be8edfb91c473f47e84093e5e49d55ba8862f5bd3017109c11ab6e7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: champpy-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d7872dfb0a5a500ee9fc7fb4c227a4c3c7a0af700298ca8ecb0445047cbc1e48
MD5 b7f598a5ef250995eb78bc4887d66995
BLAKE2b-256 82d4b6182ab6172f43dcbdba104a30fd54433adbdaae008d4d0e9b527eebba2d

See more details on using hashes here.

Provenance

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