Gurobi Modeling Examples

Explore our modeling examples for the Gurobi Python API

Battery Scheduling

This repository contains a beginner-friendly modeling example for battery scheduling using mathematical optimization and Gurobi. The notebook incrementally builds three models of increasing complexity:

The example demonstrates how to formulate, solve, and visualize battery scheduling problems in gurobipy, illustrating key concepts such as energy balance, state-of-charge dynamics, and nonlinear objectives.

View the notebook

Google Colab Link


For details on licensing or on running the notebooks, see the overview on Modeling Examples

© Gurobi Optimization, LLC