The battery scheduling problem is about deciding when to charge and discharge a behind-the-meter battery to maximize profit (or minimize cost) given predictions of time-dependent electricity prices (tariffs). In this notebook, we also consider photovoltaic (PV) generation and the technical constraints of the battery.

This notebook provides a beginner-friendly introduction to battery scheduling using mathematical optimization and Gurobi. Basic knowledge about mathematical optimization and Python programming are required as taught in Optimization 101 for Data Scientists as well as the basics in battery energy management.

Access the Jupyter Notebook Modeling Example

Click on the button below to access the example in Google Colab, which is a free, online Jupyter Notebook environment that allows you to write and execute Python code through your browser. 

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Academic License
Gurobi provides free, full-featured licenses for coursework, teaching, and research at degree-granting academic institutions. Academics can receive guidance and support through our Community Forum.

Search

Gurobi Optimization

Navigation Menu