No description
Find a file
Michiel Berger 1878b0a383 Speed up /api/calculate from 75s to 17s on h4a's small VM
- ProcessPoolExecutor with fork context: 4 workers each inherit the
  scenario df via copy-on-write. linprog/HiGHS doesn't release the GIL
  so threads were useless; processes get clean ~3.5× speedup.
- Cross-scenario LP cache keyed on everything the LP depends on
  (demand, retail, PV size, saldering, η_rt) but NOT inflation or cost.
  Result: tweaking just inflation re-uses every LP — sub-100ms.

Cold cold scenario went 75s → 17s; inflation tweak went 17s → 10ms.
2026-04-30 15:15:20 +02:00
data/raw Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
docs Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
scripts deploy.sh: auto-refresh SSH host key when h4a recreates the VM 2026-04-30 15:02:47 +02:00
src/pluginbattery Speed up /api/calculate from 75s to 17s on h4a's small VM 2026-04-30 15:15:20 +02:00
tests Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
.env.example Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
.gitignore Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
CLAUDE.md Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
Dockerfile Add plug-in-only filter to web app + deploy script 2026-04-30 14:58:52 +02:00
Procfile Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
pyproject.toml Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
README.md Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
uv.lock Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00

pluginbattery

Backtest the actual ROI of a home battery against real historical electricity prices and solar irradiance.

Answers: "If I had owned this battery (plug-in or installed) over the last N years, what would it have actually saved me?"

See CLAUDE.md for project intent, open decisions, and assumptions.