• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 29118712609
81%
main: 81%

Build:
Build:
LAST BUILD BRANCH: feat/dynamic-soc-bounds-defaults
DEFAULT BRANCH: main
Ran 10 Jul 2026 07:54PM UTC
Jobs 1
Files 168
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jul 2026 07:38PM UTC coverage: 81.244% (+0.005%) from 81.239%
29118712609

push

github

Flix6x
Speed up device_scheduler with a recursive stock balance

`_get_stock_change` expressed a device's stock at step j as a running sum
over all earlier steps, so the number of model nonzeros grew quadratically
with the scheduling horizon (e.g. ~12k nonzeros at 12h, ~349k at 3 days).
That dominated solve time on longer horizons.

Introduce an explicit `device_stock` variable coupled by a recursive
`device_stock_balance` constraint (stock[j] = a*stock[j-1] + b*change[j],
with a, b the per-step loss coefficients that apply_stock_changes_and_losses
computes). This is mathematically equivalent -- verified identical
objectives across horizons and against the planning test suite -- and keeps
the number of nonzeros linear in the horizon. Solve time drops ~10x at the
2-day default horizon and ~23x at 3 days.

Found while investigating SeitaBV/ems#172.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqGFrHfGrBHAJyjdAyr3y

19 of 19 new or added lines in 1 file covered. (100.0%)

14221 of 17504 relevant lines covered (81.24%)

0.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29118712609.1 10 Jul 2026 07:54PM UTC 168
81.24
GitHub Action Run
Source Files on build 29118712609
  • Tree
  • List 168
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29118712609
  • 90b42d2d on github
  • Prev Build on main (#29092452276)
  • Next Build on perf/linear-stock-recursion (#29118877206)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc