Battery Optimizer

One battery's dynamic programme, solved slowly once and then read fast from anywhere. Hover the state-of-charge chart: the path is the policy replayed from that point, with no re-solve.

—saved per day vs no battery
Slow tier · solve the DP
—
every slot × every state × every action → a value function V[t, s]
dp_battery.solve_battery
Fast tier · read the policy
—
one decision: a look-ahead against the stored V
policy.action · policy.rollout
Value of a stored kWh
—
λ = dV/ds where the pointer is
policy.marginal_value
40 kWh
5 kW
5 kW
Import prices (CSV or pasted numbers)
Inputs: price (left axis) and load (kW, right). Drag the points. buysellload
State of charge, with the policy as a flow field shift+click add a minimum · drag move · double-click remove chargedischarge
Power (kW) battery (+ charging)grid import (battery + load)

Running in your browser, no server. Same solver as the tests run: src/home_energy_optimizer/battery/webapi.py over dp_battery and policy.