This project looks at the optimisation of domestic batteries with domestic solar photovoltaics attached.
The project's aim is to use reinforcement learning to dispatch a battery source optimally.
Although not strictly necessary, creating a conda virtual environment is highly recommended: it will isolate users and developers from changes occuring on their operating system, and from conflicts between python packages. It ensures reproducibility from day to day.
Create a virtual env including python with:
> conda create -n battery-optimisation python=3.7
Activate the environment with:
> conda activate battery-optimisation
Later, to recover the system-wide "normal" python, deactivate the environment with:
> conda deactivate
Next, to install the required python packages, run:
> pip install -r requirements.in
To run the reinforcement learning algorithm, you must run a single file, such as the following:
> python3 src/models/run_model.py
To visualise the training in real-time, it is possible to use tensorboard. To start tensorboard, you must find your ray_results/
folder. This is usually in ~/ray_results/
. The following code should work to get tensorboard started:
> tensorboard --logdir=~/ray_results/
You can then view the training by navigating to http://localhost:6007/
in a browser.
- Weather
- Historical load
- Historical weather irradiance
- Generator capacity
- Inverse of electricity price
- State of battery charge
- Battery size
- Previous data points
- Time
- Day