Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
70ab619
Another step
FBumann Jan 20, 2026
f95ce93
Summary
FBumann Jan 21, 2026
c869e0f
Summary of Changes
FBumann Jan 21, 2026
36d7f50
The InterclusterStoragesModel batching work is complete. Let me provi…
FBumann Jan 21, 2026
020cd8d
The dead Submodel infrastructure has been successfully removed from …
FBumann Jan 21, 2026
f354057
All tasks are now complete. Here's a summary of what was accomplished:
FBumann Jan 21, 2026
f3d5ccc
Summary of Code Simplifications
FBumann Jan 21, 2026
43596d3
Use logical properties instead of init stuff
FBumann Jan 23, 2026
c3fdb72
Changes made:
FBumann Jan 23, 2026
69da7ba
Use ElementContainers
FBumann Jan 23, 2026
2694cf8
Add batched data class
FBumann Jan 23, 2026
61a7681
Improve FlowsData
FBumann Jan 23, 2026
cc6a8fb
Add remaining properties to FlowsData
FBumann Jan 23, 2026
694fe7b
Update FlowsModel
FBumann Jan 23, 2026
45b2556
Re-add some params
FBumann Jan 23, 2026
5717436
Move some logic to data
FBumann Jan 23, 2026
d7dc50a
Simplify
FBumann Jan 23, 2026
79122c0
Reduce unnessesary broadcasting
FBumann Jan 23, 2026
d63aaa5
Remove not needed variables
FBumann Jan 23, 2026
536a4cf
Summary of Changes
FBumann Jan 23, 2026
7d752b3
Reorder properties
FBumann Jan 23, 2026
08ef226
Improve constraint
FBumann Jan 23, 2026
62abe1f
Improve constraints and properties
FBumann Jan 23, 2026
bd26348
Improve constraints and properties
FBumann Jan 23, 2026
5426afc
Improve constraints and properties
FBumann Jan 23, 2026
282db6a
Update size and status constraints
FBumann Jan 23, 2026
7e25067
Update constraint names etc
FBumann Jan 23, 2026
567bc05
Update test labels
FBumann Jan 23, 2026
1484956
Add dimension ordering
FBumann Jan 23, 2026
e2e3e81
Move contributions math to FlowsModel
FBumann Jan 23, 2026
5605295
Move contributions math to FlowsModel
FBumann Jan 23, 2026
0ee1d1b
Remove old method
FBumann Jan 23, 2026
c05a0d9
Add mroe flags to FlowsData
FBumann Jan 23, 2026
2d7a25d
Move status sthings directly to FlowsModel
FBumann Jan 23, 2026
4cdb0f3
Update tests
FBumann Jan 23, 2026
3952a0c
Update tests and add previous status
FBumann Jan 23, 2026
d96f5e2
Summary of Changes
FBumann Jan 23, 2026
5e1a25e
Efficiency Improvements
FBumann Jan 23, 2026
5a3be6b
- status_effects_per_active_hour → effects_per_active_hour
FBumann Jan 23, 2026
775dde5
StatusHelpers is now slimmer. Summary of what's left:
FBumann Jan 23, 2026
990df5f
Created a new StatusData class that batches StatusParameters for a gr…
FBumann Jan 23, 2026
d76618c
Summary of changes:
FBumann Jan 23, 2026
728e6a9
Summary:
FBumann Jan 23, 2026
f126b29
Summary of Investment Modeling:
FBumann Jan 23, 2026
35d4386
Add documentation for the new modeling approach
FBumann Jan 23, 2026
78543ad
Fixed the issue where minimum_or_fixed_size and other properties retu…
FBumann Jan 23, 2026
19049e5
Only sum over periods if periods present
FBumann Jan 23, 2026
0fb73aa
small perf improvements
FBumann Jan 23, 2026
491f860
Add benchmark
FBumann Jan 23, 2026
4762340
Add batched bus constraint
FBumann Jan 23, 2026
18d8957
Final benchmark: 165ms (down from 1485ms initial - 9x speedup)
FBumann Jan 23, 2026
60204f7
Performance Summary:
FBumann Jan 23, 2026
436f4d6
Summary of _stack_values improvements:
FBumann Jan 23, 2026
21caf9f
establish method for broadcasting
FBumann Jan 23, 2026
2d41ed4
Make conversion constraint faster
FBumann Jan 23, 2026
cf467ea
Make conversion constraint faster
FBumann Jan 23, 2026
ac75aaa
Add mask to create_linear_constraints
FBumann Jan 23, 2026
c03274c
Make bus balance more readabale and use masking
FBumann Jan 24, 2026
4730a1e
Improve benchmark_model_build.py
FBumann Jan 24, 2026
b24986c
Improve benchmark_model_build.py
FBumann Jan 24, 2026
1d3b0d7
Add batching to piecewise constraint
FBumann Jan 24, 2026
ecbac85
Add batching to piecewise constraint
FBumann Jan 24, 2026
74cb0fe
Performance is even slightly better. Here's the final summary:
FBumann Jan 24, 2026
71cc538
Final Piecewise Code
FBumann Jan 24, 2026
92b510d
Summary
FBumann Jan 24, 2026
2b00946
Add fast_notnull method
FBumann Jan 24, 2026
57ff5ce
more masking, less sel()
FBumann Jan 24, 2026
6250530
Update the benchmark for super large system
FBumann Jan 24, 2026
ad8ceef
Add migration guide
FBumann Jan 24, 2026
8eeee22
Improve migration guide
FBumann Jan 24, 2026
76f676b
Merge main into feature/element-data-classes
FBumann Jan 24, 2026
c11275e
Summary of Fixes
FBumann Jan 25, 2026
41c164a
All 1059 tests pass with only 2 skipped. Here's a summary of the fixe…
FBumann Jan 25, 2026
6fc3c74
Here's a summary of what was done:
FBumann Jan 30, 2026
1e01f8a
Summary of this change:
FBumann Jan 30, 2026
2a2180f
The refactoring is complete:
FBumann Jan 30, 2026
a69c3d4
Reuse more from TypeModel class
FBumann Jan 30, 2026
ecb32ff
Make code more compact
FBumann Jan 30, 2026
5e70f61
Make code more compact
FBumann Jan 30, 2026
78b3ad4
Make code more compact
FBumann Jan 30, 2026
b8a6d16
Move mask broadcasting to add_variables()
FBumann Jan 30, 2026
183b528
Makde reindexing obsolete by ensuring consistent flow order
FBumann Jan 30, 2026
5634f0b
Move masks to FLowsData
FBumann Jan 30, 2026
8f55c1a
Add some todos
FBumann Jan 30, 2026
027ab0b
Summary
FBumann Jan 30, 2026
822838b
Summary
FBumann Jan 30, 2026
f831989
The IDs are now derived from the expression's contributor coordinate…
FBumann Jan 30, 2026
5b98cc6
Eliminated the per-effect loop and mask pattern from add_share_temp…
FBumann Jan 30, 2026
80b6fa3
Update test files for batched variable access patterns
FBumann Jan 30, 2026
b1085d8
Allign expressions before summing
FBumann Jan 30, 2026
8f9d266
Allign expressions before summing
FBumann Jan 30, 2026
4f96273
Allign expressions before summing
FBumann Jan 30, 2026
a3faca8
Here's a summary of the changes:
FBumann Jan 30, 2026
a5f1342
flixopt/effects.py:
FBumann Jan 30, 2026
bd9c623
flixopt/effects.py:
FBumann Jan 30, 2026
048575a
flixopt/effects.py:
FBumann Jan 30, 2026
a780318
Make piecewise effects properly vectorized
FBumann Jan 30, 2026
ccb5e34
Improve pieceiwse shares
FBumann Jan 30, 2026
4add600
Improve pieceiwse shares
FBumann Jan 30, 2026
b08ef94
Renamed EffectCollection → EffectsData across all files:
FBumann Jan 30, 2026
e97c1db
What changed:
FBumann Jan 30, 2026
2a999f0
EffectsModel follows the same pattern as FlowsModel and others — dire…
FBumann Jan 30, 2026
42de1ff
Here's what moved:
FBumann Jan 30, 2026
dd0723b
- Component._propagate_status_parameters() — handles status_paramet…
FBumann Jan 30, 2026
74f15c9
do_modeling() is now a clean orchestrator:
FBumann Jan 30, 2026
d19f2ff
Every model class now has a do_modeling() method that owns its build…
FBumann Jan 30, 2026
25c8f30
rename to build_model
FBumann Jan 30, 2026
74efc74
1. StoragesModel (components.py): Merged build_model() into __init_…
FBumann Jan 30, 2026
f134b55
- Deleted PreventSimultaneousFlowsModel class from elements.py
FBumann Jan 30, 2026
6366f3a
- Added _add_prevent_simultaneous_constraints() helper function in …
FBumann Jan 30, 2026
0f79095
Changes Made
FBumann Jan 31, 2026
e714c95
StoragesData now contains:
FBumann Jan 31, 2026
1381a4c
Add variable_names.md to docs
FBumann Jan 31, 2026
5d85c95
All duplication is removed. The stacked data from StoragesData (eta_c…
FBumann Jan 31, 2026
10d30c6
Make variable name prefixing explicit and TypeModel subscriptable
FBumann Jan 31, 2026
b041d67
Replace variable name string literals with VarName constants
FBumann Jan 31, 2026
d5085e7
Use cached properties for variable creation in StoragesModel and Inte…
FBumann Jan 31, 2026
9559261
1. batched.py - StoragesData: Added timesteps_extra parameter and n…
FBumann Jan 31, 2026
b8b2b45
Replace VariableType/VariableCategory with ExpansionMode + NAME_TO_EX…
FBumann Jan 31, 2026
4bf4a86
Make ConvertersModel and TransmissionsModel inherit from TypeModel
FBumann Jan 31, 2026
0cc84eb
Summary of changes:
FBumann Jan 31, 2026
2ff2251
Refactor TypeModel to accept data objects instead of raw element lists
FBumann Jan 31, 2026
56697f8
use public .carriers instead of private
FBumann Jan 31, 2026
6ac93ed
Summary:
FBumann Jan 31, 2026
302413c
Summary of changes:
FBumann Jan 31, 2026
7dd56dd
Summary of changes:
FBumann Jan 31, 2026
f38f828
perf: use sparse groupby in conversion
FBumann Jan 31, 2026
2a94130
perf: use sparse groupby in piecewise_conversion
FBumann Jan 31, 2026
805bcc5
perf: replace xr.concat with numpy pre-allocation in stack_along_dim …
FBumann Jan 31, 2026
82e6998
fix: improve method signature of build_effects_array
FBumann Jan 31, 2026
9c2d3d3
Add sparse_weighted_sum method for faster constraint building
FBumann Jan 31, 2026
8277d5d
Add sparse_weighted_sum method for faster constraint building
FBumann Jan 31, 2026
c67a6a7
Add benchmark results
FBumann Jan 31, 2026
52a581f
Improve piecewise
FBumann Jan 31, 2026
8c8eb5c
Pre-combined xarray coefficients in storage energy balance (eta * dt…
FBumann Jan 31, 2026
3561a91
Fix test
FBumann Jan 31, 2026
502fbb7
Update benchmark_results.md
FBumann Jan 31, 2026
b05f63e
Fix cross effect shares
FBumann Jan 31, 2026
0d47027
perf: use sparse_weighted_sum in bus balance
FBumann Jan 31, 2026
03eb4ad
Ensure all share defs have canonical effect order before alignment
FBumann Jan 31, 2026
d2579b4
Update tests
FBumann Jan 31, 2026
3a16bc2
Merge main into feature/element-data-classes
FBumann Jan 31, 2026
a69c129
Finalize merge
FBumann Jan 31, 2026
7c0e12e
Finalize merge
FBumann Jan 31, 2026
978a4bc
flixopt/structure.py:
FBumann Jan 31, 2026
ac0d3fa
1. components.py — Fixed duplicate dimension bug in InterclusterSto…
FBumann Jan 31, 2026
17095ab
Use ModelCoordinates._update_*
FBumann Jan 31, 2026
701f7af
Fixed: batched.py:656 and batched.py:669 — removed float() conversio…
FBumann Jan 31, 2026
a6b7103
perf: reduce memory usage in build_model (sparse coefficients + per-e…
FBumann Feb 1, 2026
9e3c164
use linopy.merge()
FBumann Feb 1, 2026
5d231e6
Revert "use linopy.merge()"
FBumann Feb 1, 2026
fc42b97
fix statistics_accessor.py
FBumann Feb 1, 2026
a425ec2
fix: FlowsContainer
FBumann Feb 1, 2026
1223a30
fix: FlowsContainer
FBumann Feb 1, 2026
9355987
feat: update to new dataarray centric architecture
FBumann Feb 2, 2026
81f9d33
Improve caching
FBumann Feb 2, 2026
7bbc34b
Update docstring
FBumann Feb 2, 2026
32de14c
1. StatisticsAccessor: Converted all 9 data properties (flow_rates,…
FBumann Feb 2, 2026
97e35f6
1. StatisticsAccessor — all data properties converted to @cached_pr…
FBumann Feb 2, 2026
5a86364
Add new tests
FBumann Feb 2, 2026
a852b5a
test_invest_optional_not_built: Changed the cheap boiler from eta=1…
FBumann Feb 2, 2026
2f17284
5 new tests:
FBumann Feb 2, 2026
2fd8782
Split into multiple files
FBumann Feb 2, 2026
6b62c1c
┌──────────────────────────┬──────────────┬────────────────────────…
FBumann Feb 2, 2026
b7e479e
⏺ All 44 tests pass. Every gap is now covered. Here's the final tally:
FBumann Feb 2, 2026
6a107ef
Add more tests
FBumann Feb 3, 2026
52196d5
Add more tests for previous_flow_rate
FBumann Feb 3, 2026
6776b2a
Add scaling results
FBumann Feb 3, 2026
279bced
Improve tests
FBumann Feb 3, 2026
b72ca41
Add scaling results
FBumann Feb 3, 2026
54372a3
Improve tests
FBumann Feb 3, 2026
d415ec1
Improve tests
FBumann Feb 3, 2026
c99aaca
Remove deprecated tests
FBumann Feb 3, 2026
ccc7685
Add a proper FLowSystemStatus Enum
FBumann Feb 3, 2026
3c56858
Summary of Fixes
FBumann Feb 3, 2026
a51f73a
Ensure minimum_duration is correctly modeled
FBumann Feb 3, 2026
fe740b0
Ensure minimum_duration is correctly modeled
FBumann Feb 3, 2026
87a6b4a
Improve investment effect contribution batching
FBumann Feb 3, 2026
f3d77c9
Merge remote-tracking branch 'origin/main' into feature/element-data-…
FBumann Feb 4, 2026
aff8271
Update CHANGELOG.md
FBumann Feb 4, 2026
49ea37d
Key features now tested:
FBumann Feb 4, 2026
09e176a
add test for effect maximum periodic
FBumann Feb 4, 2026
9b76ebe
fix: component level status effects missing
FBumann Feb 4, 2026
89ba754
fix: test regex
FBumann Feb 4, 2026
e283783
add test for effect maximum periodic Summary of new component-level …
FBumann Feb 4, 2026
93eb2d1
fix: loading solved flow_system back
FBumann Feb 4, 2026
99b3e2e
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
FBumann Feb 4, 2026
4d12250
Add warning for no relative__minimum with status
FBumann Feb 4, 2026
ffbc892
Add initial status constraint( needs work)
FBumann Feb 4, 2026
fce9638
Add initial status constraint( needs work)
FBumann Feb 4, 2026
795b7ff
Add io test to solve
FBumann Feb 5, 2026
ed9240a
Add io test to solve
FBumann Feb 5, 2026
80d716e
Add io test to solve
FBumann Feb 5, 2026
6ebd351
Add io test to solve
FBumann Feb 5, 2026
ac8c22b
Ensure solution survives io
FBumann Feb 5, 2026
4a57282
typo
FBumann Feb 5, 2026
57c6fc9
Revert "typo"
FBumann Feb 5, 2026
ce318e9
Add plan file
FBumann Feb 5, 2026
0b4a395
Add FlowSystemStatus enum and restructure validation architecture (#598)
FBumann Feb 5, 2026
ae6afb6
Add comprehensive test_math coverage for multi-period, scenarios, c…
FBumann Feb 5, 2026
5dbb020
1. Rewrote docs/architecture/batched_modeling.md
FBumann Feb 5, 2026
427be5a
⏺ Now each file has a distinct role with no redundant tables:
FBumann Feb 5, 2026
efad9c9
⏺ Done. Here's a summary of what was changed:
FBumann Feb 5, 2026
78ed286
Added TestClusteringExact class with 3 tests asserting exact per-ti…
FBumann Feb 5, 2026
b4942dd
More storage tests
FBumann Feb 5, 2026
4b91731
Add multi-period tests
FBumann Feb 5, 2026
e89150b
Add clustering tests and fix issues with user set cluster weights
FBumann Feb 5, 2026
ba0f94f
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
FBumann Feb 5, 2026
24fcd58
Update CHANGELOG.md
FBumann Feb 5, 2026
f80885b
Mark old tests as stale
FBumann Feb 5, 2026
68850eb
Update CHANGELOG.md
FBumann Feb 5, 2026
e5be97e
Mark tests as stale and move to new dir
FBumann Feb 5, 2026
fa3de4e
Move more tests to stale
FBumann Feb 5, 2026
96124b2
Change fixtures to speed up tests
FBumann Feb 5, 2026
d71f85e
Moved files into stale
FBumann Feb 5, 2026
3710435
Renamed folder
FBumann Feb 5, 2026
79c4288
Reorganize test dir
FBumann Feb 5, 2026
0eeb8ab
Reorganize test dir
FBumann Feb 5, 2026
6387a29
Rename marker
FBumann Feb 5, 2026
f73c346
2. 08d-clustering-multiperiod.ipynb (cell 29): Removed stray <cell_…
FBumann Feb 5, 2026
f4601b8
Feature/test math+more (#600)
FBumann Feb 5, 2026
de1901a
fix docstrings
FBumann Feb 5, 2026
4dfc86c
Merge branch 'feature/test-math' into feature/element-data-classes
FBumann Feb 5, 2026
92f5000
Let me give you a summary of what we've implemented:
FBumann Feb 5, 2026
f71d44a
Add tests for legacy solution access
FBumann Feb 5, 2026
3fe39c7
Let me give you a summary of what we've implemented:
FBumann Feb 6, 2026
70cb441
Merge remote-tracking branch 'origin/main' into feature/element-data-…
FBumann Feb 6, 2026
2242c51
Merge branch 'feature/element-data-classes' into feature/element-data…
FBumann Feb 6, 2026
07e8dba
fix: [::-1] only flips axis 0. The duration curve sort used [::-1] wh…
FBumann Feb 6, 2026
657321d
fix: None timestep_duration for RangeIndex. calculate_timestep_durati…
FBumann Feb 6, 2026
dc038e0
fix: _fit_to_model_coords not initialized before use. Moved self._fit…
FBumann Feb 6, 2026
8791b46
docss: Added text language identifiers to 5 fenced code blocks that c…
FBumann Feb 6, 2026
d588418
fix: falsy zero treated as missing. _get_scalar_or_nan had float(valu…
FBumann Feb 6, 2026
27aacf0
fix: TypeError on integer/object dtypes. fast_notnull and fast_isnull…
FBumann Feb 6, 2026
0896270
fix: 1. Lines 786-787 — Substring false positive. element_id in con…
FBumann Feb 6, 2026
6a7b569
fix: status doesn't downgrade after clearing. _clear_model_built clea…
FBumann Feb 6, 2026
e92c30e
fix: scalar DataArray when no arrays. _concat_property returned xr.D…
FBumann Feb 6, 2026
6c6931f
Summary of the simplification:
FBumann Feb 6, 2026
39b7d50
Enhance backwards compatability:⏺ All 238 tests pass in the tests/sup…
FBumann Feb 6, 2026
a1596db
Remove unused parameters from PiecewiseBuilder
FBumann Feb 6, 2026
fb25a53
Re-enable superseeded tests in the CI
FBumann Feb 6, 2026
aa6b63f
Migrate some tests
FBumann Feb 6, 2026
8c8fb61
Summary of fixes applied in this session:
FBumann Feb 6, 2026
211b506
Fix coords ordering and update cluster tests
FBumann Feb 6, 2026
62068f7
Make broadcasting more efficient
FBumann Feb 6, 2026
e1c7b4c
Re-add missing conftest
FBumann Feb 6, 2026
e74e775
drop not needec ontributor dims to reduce variable count
FBumann Feb 6, 2026
84c81d9
drop not needec ontributor dims to reduce variable count
FBumann Feb 7, 2026
e50b021
Consolidate data stacking into *Data classes (#605)
FBumann Feb 10, 2026
f2c3a9b
Update CHANGELOG.md
FBumann Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,42 @@ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOp

Until here -->

## [7.0.0] - Unreleased

**Summary**: Performance release with **up to 67x faster model building** for large systems through batched/vectorized operations.

### 🚀 Performance

#### Batched Model Building (#588)

Complete rewrite of the model building pipeline using batched operations instead of per-element loops:

| System Size | Build Speedup | Write LP Speedup |
|-------------|---------------|------------------|
| XL (2000h, 300 converters) | **67x** (113s → 1.7s) | **5x** (45s → 9s) |
| Complex (72h, piecewise) | **2.6x** (1s → 383ms) | **4x** (417ms → 100ms) |

**Architecture Changes**:

- **Type-level batched models**: New `FlowsModel`, `StoragesModel`, `BusesModel` classes process all elements of a type in single vectorized operations
- **Pre-computed element data**: All `*Data` classes (`FlowsData`, `StoragesData`, `EffectsData`, `BusesData`, `ComponentsData`, `ConvertersData`, `TransmissionsData`) cache element parameters as xarray DataArrays with element dimensions
- **Mask-based variables**: Use linopy's `mask=` parameter for heterogeneous elements (e.g., only some flows have status variables)
- **Fast NumPy helpers**: `fast_notnull()` / `fast_isnull()` are ~55x faster than xarray equivalents

**Model Size Reduction** (fewer, larger variables/constraints):

| System | Variables (old → new) | Constraints (old → new) |
|--------|----------------------|------------------------|
| XL (2000h, 300 conv) | 4,917 → 21 | 5,715 → 30 |
| Medium (720h) | 370 → 21 | 428 → 30 |

### 🐛 Fixed

- **Status duration constraints**: Fixed `min_downtime` and `min_uptime` constraints not being enforced in batched mode due to mask broadcasting issues
- **Investment effects**: Fixed investment-related effects (`effects_of_investment`, `effects_of_retirement`, `effects_per_size`) not being registered when using batched operations

---

## [6.0.3] - Upcoming

**Summary**: Bugfix release fixing `cluster_weight` loss during NetCDF roundtrip for manually constructed clustered FlowSystems.
Expand Down
Loading
Loading