QUASAR Examples

Interactive Example Notebook in Google Colab: Battery Storage

by

Check out our interactive example notebooks in Google Colab to find out just how simple it is to solve multistage stochastic programming problems with QUASAR®!

What to expect from this notebook? In this example notebook, we look at the problem of managing a small battery storage under price uncertainty. The notebook is an introductory example to demonstrate how easy it is to model and solve seemingly difficult stochastic-dynamic optimization problems.

We consider a simple model of a battery storage system that is connected to the grid but not used to supplement a smart home. An optimal decision policy would try to buy electricity when the price is low and sell electricity when the price is high. Prices can be observed in real time in short time increments, and we want to make charge and release decisions that cover the next hour. Deviations from the realized day-ahead price of the previous hour are modeled by a geometric random walk. This setup is simple, but yet realistic enough for an actual application.

For this problem, it is well-known that a bang-bang type policy is optimal, where two price thresholds determine when to switch between charge, discharge, and idle. We will see how the optimal thresholds can be easily obtained from forward simulations of the optimal policy.

Of course, this is just an illustrative example that merely scratches the surface of what QUASAR can do. If you are interested in seeing a more production-ready model in action, check out or solutions for storage optimization to see what is possible.

Any QUASAR® model can be transformed into a fully-fledged software solution for end users with QUASAR® Cloud. Learn more about QUASAR Cloud!


GoogleColab_Battery