Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simple DC current model for a stand-alone storage unit or a hybrid installation (generation and battery) accounting for different optimization policies (maximizing arbitrage revenues and/or minimizing unsupplied energy).

License

Notifications You must be signed in to change notification settings

rte-france/BATTman

Repository files navigation

BATTman

rte-france - BATTman License: MPL 2.0 Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Description

BATTman stands for "BATTery model for arbitrage". To anyone objecting that the 'n' is missing, we shall remind that the project is still work in progress (and this applies to the name too) !

This web app optimizes the setpoint of a battery (either as a stand-alone storage unit, or embedded in a hybrid power plant e.g. including RES generation) according to different policies:

  • maximizing arbitrage revenues for the whole plant first,
  • minimizing spilled energy first (and then maximizing arbitrage revenues, if applicable),
  • minimizing spilled energy, and shifting power injection to the nearest time step

Plant parameters can easily be customized and saved in a dedicated YAML file for later use via the app, e.g. to compare the impact of different settings on revenues. Plant parameters include the maximal power rating at the point of connection, as well as battery-specific features: efficiency, losses and simple (yet highly customizable) energy management strategies. Besides, various time-series may be loaded to represent variable power limits for the plant , energy prices or the net power injection from the plant to the network.

Results can be vizualized in interactive plots as well as in tabular format, and can easily be downloaded in both types.

Installation

Simply clone this repository where you plan to intall BATTman.

git clone https://github.com/rte-france/BATTman.git

It is highly recommended to run BATTman in a virtual environment. It can be created using pip or conda. In both cases, do not forget to activate your environment (beware : the command is OS-specific)!

Example using pip on Linux/macOS:

cd BATTman
python -m venv .venv
source .venv/bin/activate

Install the required modules for BATTman:

pip install -r requirements.txt

This will install the following list of Python modules :

  • unidecode
  • numpy
  • pandas
  • matplotlib
  • highspy
  • linopy
  • plotly
  • streamlit
  • pyyaml
  • tabulate

Quick Start

BATTman is a web app using Streamlit. To run it, simply execute the following command (more sophisticated options are available in the Streamlit documentation if needed, e.g. to use a specific port).

streamlit run BATTman.py

In most cases, this will open a new web page in your favorite browser. If not, then open the URL indicated in your console (most likely this one: http://localhost:8501), and off we go!

Example data

To use BATTman, input files will be needed in the study configuration tab. Example data are provided with the code to quickly get a favor of what BATTman looks like :

  • an example YAML file for plant configuration is available here :

cfg_etude/example_site_configuration.yml

  • an example file for electricity prices (with 168 entries) is available here :

cfg_etude/example_electricity_price_168.csv

  • an example file for variable plant power limits (with 168 entries) is available here :

cfg_etude/example_power_limitations_168.csv

  • an example file for PV generation in the plan (with 168 entries) is available here :

cfg_etude/example_PV_generation_168.csv

Disclaimer

The BATTman code is provided “as is” and any express or implied warranties, including fitness for a particular purpose are disclaimed.

Besides, the early version of this code is released for French-speaking users only, as the user interface does not support other languages (yet).

About

Simple DC current model for a stand-alone storage unit or a hybrid installation (generation and battery) accounting for different optimization policies (maximizing arbitrage revenues and/or minimizing unsupplied energy).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages