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.
Examples
- HTTP API: Integration via a simple HTTP API and WebSocket notifications.
- CitrineOS: Full OCPP 1.6J integration with CitrineOS CSMS, including a Docker Compose stack with charger simulator, event-driven scheduling via RabbitMQ, and an automated curtailment demo.
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
Metadata
Release files for optivgi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optivgi-0.2.0.tar.gz | 27.9 kB | With provenance | Details for optivgi-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optivgi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for optivgi-0.2.0-py3-none-any.whl |
Total release size: 60.4 kB
Release files / optivgi-0.2.0.tar.gz
| Download URL | optivgi-0.2.0.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a65f378474c284c0881f308b76a7cb694ff8df885ba3f1cc69bcb91c0bed7c4f
|
|
BLAKE2b-256 checksum How to use checksums |
307a6da316e4ecbc7e18ae5c2b7bedff86bdb17b9e54040e14fd15a01df4565d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logRelease files / optivgi-0.2.0-py3-none-any.whl
| Download URL | optivgi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 32.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d44b51efe595c44077a08a645b56bfdb1fcad65a75ba7b481a98884a2c5a8580
|
|
BLAKE2b-256 checksum How to use checksums |
6abf9b1bff49479642dfa26e2aa528a352685e56ffe2e2e947a9db25913c82d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logSecurity for optivgi 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for optivgi-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logA 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.