Skip to main content

MobEV

MobEV logo

Python PyPI version Package manager Tests Documentation

MobEV is a mobility-based, geolocalized EV charging-demand model. It generates EV charging-demand profiles for distribution-network studies from weekly car-trip data. The model samples an EV fleet and charging access, simulates battery state of charge and charging sessions, and aggregates the resulting demand at the configured timestep.

Full reference documentation: https://pages.persee.minesparis.psl.eu/planeterr/mobev/.

Requirements and installation

MobEV requires Python 3.13 or newer.

Install the published package with pip:

python -m pip install mobev

Or add it to an existing uv-managed project:

uv add mobev

For development from a repository checkout, use the included lock file:

uv sync

To build the documentation locally:

uv sync --group docs
make -C docs html

Inputs

Each simulation needs a trip source directory containing two files:

weekday_trips.gpkg
weekend_trips.gpkg

The source data must provide person and activity identifiers, departure and arrival times, activity purposes, car mode, and trip geometries. They are generated with a modified version of EQASIM. See the input documentation for the complete input schema.

When tariff-aware charging is enabled, the tariff CSV must contain a contiguous integer index and one numeric price or price_eur_kwh column.

Configuration

The authoritative configuration template is available in the configuration documentation. Repository users can copy config/config.yaml when maintaining separate experiments, then pass the copy to the pipeline. The repository template uses project-relative data paths. When using the installed package, provide a relative or absolute path for tariff.file (or disable the tariff) and pass the trip-directory path explicitly.

The main sections are:

  • simulation: timestep, start datetime, random seed, distance factor, CRS, and seasonal consumption.
  • fleet: EV penetration and fixed or segmented vehicle attributes.
  • battery: usable SOC limits, charging efficiency, and initial SOC.
  • charging: minimum parking duration and SOC thresholds.
  • tariff: optional time-of-use charging and tariff CSV settings.
  • locations: charger availability and charger-power distributions by location type.

Edit the YAML values directly, for example:

simulation:
  timestep_minutes: 15
  random_seed: 42

fleet:
  ev_penetration: 0.10

tariff:
  enabled: false
  file: path/to/tariff.csv

Set tariff.enabled to true only when tariff.file points to a valid CSV. The random seed makes fleet sampling, charger assignment, and initial SOC reproducible for the same inputs and dependency versions.

Run the simulation pipeline

The public API has three mandatory simulation stages. run() executes them and returns the main SimulationResults object. It contains the three mandatory-stage result objects. Profile aggregation is optional and is intended for data analysis and visualisation; it returns a separate AggregatedProfiles object.

from mobev import SimulationPipeline

pipeline = SimulationPipeline.from_yaml(
    config_path="config/config.yaml", trip_source_dir="data/input/trips/YOUR_FEEDER"
)
result = pipeline.run()

assert result.charging_simulation.charging_profiles_df is not None

Run individual stages when you need to inspect or reuse their result objects:

prepared = pipeline.prepare_trips()
scenario = pipeline.build_scenario(prepared)
simulation = pipeline.simulate(scenario)
aggregated = pipeline.aggregate(by="total")

The mandatory stage contracts are:

TripPreparer -> PreparedTrips
ScenarioBuilder -> ScenarioInputs
ChargingSimulator -> ChargingSimulation
ProfileAggregator (optional) -> AggregatedProfiles

The stage internals and table schemas are documented in the workflow, results, and API reference pages.

Testing

Run the test suite with:

.venv/bin/pytest -q

Further documentation

The Sphinx documentation is the authoritative project documentation. It covers inputs, configuration, the three mandatory pipeline stages, optional aggregation for analysis and visualisation, tariff behavior, result objects, visualization, logging, and the public API. PRICE_PLAN.md, PRICE_RESPONSE.md, and ev_price_response_modelling_approaches.md are design/research notes rather than supported runtime documentation.

Metadata

Release files for mobev 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobev 0.2.0
File Size Uploaded Provenance
mobev-0.2.0.tar.gz 74.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mobev 0.2.0
File Interpreter ABI Platform
mobev-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.0 kB

Release files / mobev-0.2.0.tar.gz

Download URL mobev-0.2.0.tar.gz
Size 74.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2fd4af50814db8483bfcce88b493919144516e8c72545be3f1e8fb6070574fe9
BLAKE2b-256 checksum
How to use checksums
07b4597096b411425604edeb60f7d5ea0de0e083faeccf4e77b5dcc2de02740f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mobev-0.2.0-py3-none-any.whl

Download URL mobev-0.2.0-py3-none-any.whl
Size 70.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f12344244a060b916b54d8fc25ecbdee4cd3e25709ef12ac90f5fe8103bdc7c
BLAKE2b-256 checksum
How to use checksums
6f92946251f95862fc381dbfe3fae06c9bd2fde6e7c4396bf05db531b323e1c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mobev 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page