v4.0.0
FlexTool 4.0.0 — first stable v4
FlexTool is now pip-installable: pip install flextool. This is the first stable 4.0.0 release. main is now the default branch and master is deprecated.
Database migration v67 → v69 (automatic on load). Additive and defaults to prior behaviour — a migrated database is byte-identical until you opt into the new features.
Highlights
- Now on PyPI.
pip install flextool, launch the GUI withflextool, update withpip install --upgrade flextool. Cross-platform CI (Linux, Windows, macOS) is green. - Rust-based matrix generation. A thin Python layer builds the optimisation matrix in polars and solves with HiGHS, with automatic problem scaling that often speeds up the solve considerably.
Representative periods
- Net-load representative-period clustering (
--netload-clustering) — cluster on a real-MW net-load signal instead of normalized profiles;--vre-penetrationtunes the demand-match target. Default path is byte-identical. group.use_for_representative_periods(schema v68) — mark region-groups as net-load aggregation units.- Net-load iteration driver — invest-only iterate-until-stable loop;
--keep-bestkeeps the lowest full-year dispatch-cost set.
GUI
- Dispatch plots & colors/order — live picker (debounced, no Apply button), two-pane category/entity layout seeded from solved output, flowGroup/nodeGroup band ordering, and assorted plot fixes.
- Calibrate investments — three-way RP-alternative disposition (
detached/add/new_scenario), final outputs driven by the project's File-outputs choices, per-scenario report folders.
Outputs
- Multi-use storage nodes now surface in node balance & price (plain batteries stay hidden).
existingcapacity column is the pre-invest baseline, not the cumulative chain-sum.- Upgrade-safe results DB schema (additively tops up an older
results.sqlite).
Fixes
- Var-unit inter-period storage balance for blended weights (unit-size mis-scaling).
max_flow_for_unconstrained_variablesoverride now honoured.- Representative-period hull seeded with force-included periods.
- v38
node_typemigration floor written to a dedicated lowest-rank alternative. - Windows:
ensure_settings_dbno longer mis-parses drive-letter paths.
Full changelog: see CHANGELOG.md.