An EV smart charging management application designed to optimize electric vehicle charging based on power or pricing constraints.
Project description
Opti-VGI: EV Smart Charging Scheduler Application
Opti-VGI is an EV smart charging management application designed to optimize electric vehicle charging based on power or pricing constraints. It provides a flexible framework whose scheduling logic can integrate with Charge Station Management Systems (CSMS). The specific integration method, potentially supporting protocols like OCPP 1.6 or OCPP 2.0.1 / ISO 15118, depends on the implementation of its communication layer.
Documentation: https://argonne-vci.github.io/Opti-VGI
Key Features
- Constraint-Based Optimization: Schedules EV charging considering factors like overall site power limits or dynamic pricing signals.
- Modular Architecture: Clearly separates communication logic (
Translationlayer) from optimization strategies (Algorithmlayer). - Pluggable Algorithms: Supports different optimization approaches. Includes implementations like:
PulpNumericalAlgorithm: Uses linear programming via the PuLP library.GoAlgorithm: A custom heuristic-based algorithm.
- CSMS Integration Interface: The
Translationabstract class defines the necessary methods to fetch data (EVs, constraints) and send charging commands, allowing integration with various external systems. The implementation of this layer determines how Opti-VGI communicates (e.g., via API calls, database interaction, or specific protocols like OCPP). - Handles Active & Future EVs: Considers both currently connected EVs and planned future reservations in its scheduling.
- Asynchronous Operation: Designed to run scheduling logic periodically or in response to events using background worker threads.
Architecture Overview
Opti-VGI follows a modular design:
- Translation Layer (
optivgi.translation): An abstract interface (Translation) for communication with external systems (e.g., a CSMS). Implementations handle fetching EV data, power constraints, and sending charging profiles. This is where specific communication protocols (like OCPP methods via a library, or custom API calls) would be implemented. - SCM Runner (
optivgi.scm_runner): Orchestrates the scheduling cycle, using aTranslationinstance to get inputs, anAlgorithminstance to calculate schedules, and theTranslationinstance again to dispatch results. - SCM Algorithm (
optivgi.scm.algorithm): An abstract interface (Algorithm) for charging strategies. Concrete implementations contain the core optimization logic (e.g.,GoAlgorithm,PulpNumericalAlgorithm). - EV Data Structure (
optivgi.scm.ev): A standard dataclass (EV) representing vehicles and their charging parameters. - Worker Threads (
optivgi.threads): Helpers to run the SCM logic periodically or on events without blocking the main application.
Sequence Diagram
The diagram shows the flow of data and commands between the EVSEs, Opti-VGI, and the CSMS, highlighting the roles of the Translation and Algorithm layers in this interaction.
It illustrates how Opti-VGI fetches data from the CSMS, processes it using the selected algorithm, and sends back charging commands.
Installation
You can install the latest stable release from PyPI:
pip install optivgi
For development, clone the repository and install with development dependencies:
git clone https://github.com/argonne-vci/Opti-VGI.git
cd Opti-VGI
pip install -e ".[dev]"
Usage & Examples
Opti-VGI provides the core scheduling framework. To use it, you need to:
- Implement the
Translationinterface: Create a concrete class that inherits fromoptivgi.translation.Translationand implements theget_evs,get_peak_power_demand, andsend_power_to_evsmethods to communicate with your specific CSMS or data source. - Choose an
Algorithm: Select one of the provided algorithms (e.g.,GoAlgorithm,PulpNumericalAlgorithm) or implement your own inheriting fromoptivgi.scm.algorithm.Algorithm. - Run the
scm_worker: Use theoptivgi.threads.scm_workerfunction in a separate thread, providing yourTranslationimplementation and chosenAlgorithmclass. Trigger the worker using an event queue.
An example demonstrating integration via a simple HTTP API and WebSocket notifications can be found in the ./examples/http-api/ directory. See the Examples Documentation for more details.
Contributing
Contributions are welcome! Please feel free to open an issue on the GitHub Issues page to report bugs, suggest features, or discuss potential improvements.
License
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Links
- Documentation: https://argonne-vci.github.io/Opti-VGI
- PyPI Package: https://pypi.org/project/optivgi/
- GitHub Repository: https://github.com/argonne-vci/Opti-VGI
- Issue Tracker: https://github.com/argonne-vci/Opti-VGI/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file optivgi-0.1.9.tar.gz.
File metadata
- Download URL: optivgi-0.1.9.tar.gz
- Upload date:
- Size: 27.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6c9fcdc1cc6a485debff038a18789af4c0320b8e754e91078607643df407c23
|
|
| MD5 |
659cff4644618a9fa664f2edcd291b61
|
|
| BLAKE2b-256 |
e013c75d3780ae4c43a4f40b7c6fc3cc8065a351a22f73ae338b0dbe83f7eca2
|
Provenance
The following attestation bundles were made for optivgi-0.1.9.tar.gz:
Publisher:
publish.yml on argonne-vci/Opti-VGI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optivgi-0.1.9.tar.gz -
Subject digest:
b6c9fcdc1cc6a485debff038a18789af4c0320b8e754e91078607643df407c23 - Sigstore transparency entry: 201739707
- Sigstore integration time:
-
Permalink:
argonne-vci/Opti-VGI@258dc7eab50a761189c8ac014261a2d7c1d5afb7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/argonne-vci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@258dc7eab50a761189c8ac014261a2d7c1d5afb7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file optivgi-0.1.9-py3-none-any.whl.
File metadata
- Download URL: optivgi-0.1.9-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27513a01b76fcb355b60d7026c26e40ffc84a5ea6c33869ac8936d08d8cf353a
|
|
| MD5 |
95d68d4d17c569324c38255c69cae187
|
|
| BLAKE2b-256 |
5c61bcfb93865b4dcce43d7f1bf9172f8651b2f0232bf5429f3cc46aa2fe931e
|
Provenance
The following attestation bundles were made for optivgi-0.1.9-py3-none-any.whl:
Publisher:
publish.yml on argonne-vci/Opti-VGI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optivgi-0.1.9-py3-none-any.whl -
Subject digest:
27513a01b76fcb355b60d7026c26e40ffc84a5ea6c33869ac8936d08d8cf353a - Sigstore transparency entry: 201739708
- Sigstore integration time:
-
Permalink:
argonne-vci/Opti-VGI@258dc7eab50a761189c8ac014261a2d7c1d5afb7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/argonne-vci
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@258dc7eab50a761189c8ac014261a2d7c1d5afb7 -
Trigger Event:
release
-
Statement type: